SQL can be very simple
Let’s understand the SQL query:
SELECT *
FROM database_table
WHERE Total Speakers > 550,000,000
SELECT — This specifies which columns from the database you want to return. If you only wanted the Language and Number of Speakers, you would specify write: “SELECT Language, Total Speakers” instead of “SELECT “. “SELECT *“ indicates that you want all columns returned.
FROM — This specifies which database table you want data from. Imagine you have a database table called “globalLanguages“ and another called “globalGDP”. If you wanted data on language statistics like in the screenshot, you would specify “FROM globalLanguages” but if you were interested in global GDP data, you would write “FROM globalGDP“.
WHERE — The WHERE keyword is optional. If you don’t specify it, the SQL query will return all rows from a database. In the 13 rows above, that’s not too much data, but when dealing with billions of records, you’re likely going to need to further restrict the returned dataset.
You can filter data in any column, above we are restricting the Total Speakers column to be at least 550,000,000. But if we only wanted Romance language, we could write “WHERE Branch = ‘Romance‘ “. We could also exclude Romance languages by writing
“WHERE Branch != ‘Romance‘ “. In SQL, “!=” means “Not Equal”.