Course Notes
Use this workspace to take notes, store sample queries, and build your own interactive cheat sheet!
You will need to connect your SQL cells to an integration to run a query.
- You can use a sample integration from the dropdown menu. This includes the Course Databases integration, which contains tables you used in our SQL courses.
- You can connect your own integration by following the instructions provided here.
Note: When using sample integrations such as those that contain course data, you have read-only access. You can run queries, but cannot make any changes such as adding, deleting, or modifying the data (e.g., creating tables, views, etc.).
Take Notes
Add notes here about the concepts you've learned and SQL cells with code you want to keep.
SELECT CHARINDEX('a',variable_name) AS location_of_a_in_variable_name
SELECT SUBSTRING(variable_name,12,12) AS 12_in_from_left_12_chars_captured
SELECT REPLACE(variable,'find','replace') AS column_name
Having
WHERE
is used to filter rows before any grouping occurs. Once you have performed a grouping operation, you may want to further restrict the number of rows returned. This is a job for HAVING
. In this exercise, you will modify an existing query to use HAVING
, so that only those results with a sum of over 10000 are returned.