This forum is recommended for questions regarding administration of PostgreSQL, which your questions are not related to. pgsql-gernal or pgsql-sql would be better fits. But I'd strongly suggest that you pause and learn SQL basics in a structured way. You've said several times that you've been writing queries for a long time, but your questions here demontrate a serious lack of understanding of the basics. My personal recommendation: https://www.postgresql.org/docs/11/tutorial-sql.html Or, for a quicker start: https://www.postgresql.org/docs/11/tutorial-sql.html https://www.postgresql.org/docs/11/sql.html -- Scott Ribe scott_ribe@xxxxxxxxxxxxxxxx https://www.linkedin.com/in/scottribe/