Get Query From Postgresql Architecture Interview