From the course: SQL for Non-Programmers
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Formatting your query - SQL Tutorial
From the course: SQL for Non-Programmers
Formatting your query
Now that you've gotten your hands dirty with some SQL programming, before we move on, let's touch on how best to format your queries. It's important to review query writing best practices before diving deeper into coding, because good habits make for good coding, and it's easier to enforce these good habits if we use them from the start. You should always have top of mind how to write your queries in an intuitive, readable manner. Why does this matter? If you don't keep a clear and consistent pattern in the style of your queries, you can quickly create confusing code, confusing for you if you come back and reference it later, or confusing for your team. There are not necessarily established guidelines for SQL queries, but there are best practices and recommendations that you can follow to write code like a pro. You may have already noticed that in our previous queries, I was using uppercase letters for the SQL keywords like SELECT and FROM, and lowercase letters for the column and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Getting started with SQL5m 33s
-
(Locked)
Retrieving data with SELECT7m 19s
-
(Locked)
Formatting your query5m 40s
-
(Locked)
Putting order to your data with ORDER BY6m 52s
-
(Locked)
Filtering your data with WHERE5m 9s
-
(Locked)
Filtering your data with multiple conditions8m 5s
-
(Locked)
Challenge: Practice with basic commands1m 40s
-
(Locked)
Solution: Basic commands solved4m 9s
-
-
-
-
-