SQL can be very simple

Assume you want data from Texas cities with a 2022 population estimate above 1 million:

SELECT *

FROM database_table

WHERE ST = ‘TX‘ AND 2022 estimate > 1,000,000

  • The statement returns 3 rows of data for Texas cities with a population of above 1 mn — Houston, San Antonio, and Dallas

  • But be careful when using both AND and OR in a SQL query — a future lesson covers this nuance when parentheses are necessary to get the desired data