Let's jump right in!
Open your SQL Client (e.g. TablePlus) and connect to your Local Database that hosts the SFDS Getting Started dataset. Or, login to Looker and navigate to the SQL Runner feature (Develop → SQL Runner). Either will allow you to start writing and running SQL.
Here's our first query:
SELECT * FROM getting_started.payments ;
SELECT sets up your query to choose which fields in a dataset to access. The * is SQL's special way of telling the database, "grab all fields". FROM sets up your query to choose which dataset to access, and the ; simply ends the query.
To grab a single field, exchange the * with the field name of interest. For instance, to grab all rows of data in the user_id field of the Payments table:
SELECT user_id FROM getting_started.payments ;
To grab multiple fields, separate each with a comma. For instance, to grab all rows of data in the user_id and payment_amount fields of the Payments table:
SELECT user_id , payment_amount FROM getting_started.payments ;
So, if we wanted to replicate SELECT * by manually listing each field in the Payments table, it would look like this:
SELECT user_id , payment_timestamp , payment_id , payment_amount , payment_returned FROM getting_started.payments ;