- SQL practice
- Knowledge Map
- 1: Hyperskill
- 2: SoftUni
- 3: Practical SQL (book)
- Ch01: Setting Up Your Coding Environment
- Ch02: Creating Your First Database and Table
- Ch03: Beginning Data Exploration with SELECT
- Ch04: Understading Data Types
- Ch05: Importing and Exporting Data
- Ch06: Basic Math and Stats with SQL
- Ch07: Joining Tables in a Relational Database
- Ch08: Table Design That Works for You
- Ch09: Extracting Information by Grouping and Summarizing
- Ch10: Inspecting and Modifying Data
- Ch11: Statistical Functions in SQL
- Ch12: Working with Dates and Times
- Ch13: Advanced Query Techniques
- Ch14: Mining Text to Find Meaningful Data
- Ch15: Analyzing Spatial Data with PostGIS
- Ch16: Working with JSON Data
- 4: SQL Puzzles and Answers (book)
- Knowledge Map
- Hyperskill DB exercises
- Electronics Store Customer
⭐4.43hr - Databases for Sales
⭐4.27hr - Hacker Attack
⭐4.57hr - Library Management System
⭐4.06hr - School of Wizards and Magic Wars
⭐4.39hr - Computer Store Database
⭐4.27hr
- SoftUni DB exercises
- Anthony DeBarros, No Starch Press
| listing | solution | num |
|---|---|---|
| 01-01 | check postgress version | 1 |
| listing | solution | num |
|---|---|---|
| 02-01 | create a database - analysis | 2 |
| 02-02 | create table - teachers | 3 |
| 02-03 | insert data - teachers | 4 |
| listing | solution | num |
|---|---|---|
| 03-01 | querying all rows and columns - teachers | 5 |
| 03-02 | querying a subset of columns | 6 |
| 03-03 | sorting a column with order by | 7 |
| 03-04 | sorting multiple columns with order by | 8 |
| 03-05 | querying distinct values | 9 |
| 03-06 | querying distinct pairs of values | 10 |
| 03-07 | filtering rows using where | 11 |
| 03-08 | filtering with like and ilike | 12 |
| 03-09 | combining operators using and & or | 13 |
| 03-10 | a select statement including where and order by | 14 |
| listing | solution | num |
|---|---|---|
| 04-01 | character data types in aciton | 15 |
| 04-02 | number data types in action | 16 |
| 04-03 | rounding issues with float columns | 17 |
| 04-04 | the timestamp and interval types in action | 18 |
| 04-05 | using the interval data type | 19 |
| 04-06 | three cast() examples | 20 |
| listing | solution | num |
|---|---|---|
| 05-01 | using copy for data import | 21 |
| 05-02 | create table statement for census county population estimates | 22 |
| 05-03 | importing census data using copy | 23 |
| 05-04 | creating a table to track superviser salaries | 24 |
| 05-05 | importing salaries data from csv to three table columns | 25 |
| 05-06 | importing a subset of rows with where | 26 |
| 05-07 | using a temporary table to add a defalt value to a column during import | 27 |
| 05-08 | exporting an entire table with copy | 28 |
| 05-09 | exporting selected columns from a table with copy | 29 |
| 05-10 | exporting query result with copy | 30 |
| listing | solution | num |
|---|---|---|
| 06-01 | basic addition, subtraciton and multiplicatin with sql | 31 |
| 06-02 | integer and decimal division with sql | 32 |
| 06-03 | exponents, roots, and factorials with sql | 33 |
| 06-04 | selecting census population estimate columns with aliases | 34 |
| 06-05 | subtracting two columns in us_counties_pop_est_2019 | 35 |
| 06-06 | checking census data totals | 36 |
| 06-07 | calculating the percent of a county's area that is water | 37 |
| 06-08 | calculating the percent change | 38 |
| 06-09 | using the sum() and avg() aggregate functions | 39 |
| 06-10 | testing sql percentile functions | 40 |
| 06-11 | using sum(), avg(), and percentile_cont() aggregate functions | 41 |
| 06-12 | passing an array of values to percentile_cont() | 42 |
| 06-13 | using unnest() to turn an array into rows | 43 |
| 06-14 | finding the most frequent value with mode() | 44 |
| listing | solution | num |
|---|---|---|
| 07-01 | creating the departments and employees table | 45 |
| 07-02 | joining the employees and departments table | 46 |
| 07-03 | creating two tables to explore join types | 47 |
| 07-04 | using join | 48 |
| 07-05 | join with using | 49 |
| 07-06 | using left join | 50 |
| 07-07 | using right join | 51 |
| 07-08 | using full outer join | 52 |
| 07-09 | using cross join | 53 |
| 07-10 | filtering to show missing values with is null | 54 |
| 07-11 | querying specific columns in a join | 55 |
| 07-12 | simplifying code with table aliases | 56 |
| 07-13 | joining multiple tables | 57 |
| 07-14 | combining query results with union | 58 |
| 07-15 | combining query results with union all | 59 |
| 07-16 | customizing a union query | 60 |
| 07-17 | combining query results with intersect and except | 61 |
| 07-18 | performing math on joined census tables | 62 |
| listing | solution | num |
|---|---|---|
| 08-01 | declaring a single-column natural key as a primary key | 63 |
| 08-02 | an example of a primary key violation | 64 |
| 08-03 | declaring a composite primary key as a natural key | 65 |
| 08-04 | example of a composite primary key violation | 66 |
| 08-05 | declaring a bigint column as a surrogate key using identity | 67 |
| 08-06 | restarting an identity sequence | 68 |
| 08-07 | a foreign key example | 69 |
| 08-08 | examples of check constraints | 70 |
| 08-09 | a unique constraint example | 71 |
| 08-10 | a not null constraint example | 72 |
| 08-11 | dropping and adding a primary key and a not null constraint | 73 |
| 08-12 | importing new york city address data | 74 |
| 08-13 | benchmark queries for index performance | 75 |
| 08-14 | creating a b-tree index on the new_york_addresses table | 76 |
| listing | solution | num |
|---|---|---|
| 12-01 | extracting the components of a timestamp value | 129 |
| 12-02 | three functions for making datetimes from components | 130 |
| 12-03 | comparing current_timestamp and clock_timestamp() during row insert | 131 |
| 12-04 | viewing your current time zone setting | 132 |
| 12-04 | showing time zone abbreviations and names | 133 |
| 12-05 | setting the time zone for a client session | 134 |
| 12-06 | creating a table and importing nyc yellow taxi data | 135 |
| 12-07 | counting taxi trips by hour | 136 |
| 12-08 | exporting taxi pickups per hour to a csv file | 137 |
| 12-09 | calculating median trip time by hour | 138 |
| 12-10 | creating a table to hold train trip data | 139 |
| 12-11 | calculating the length of each trip segment | 140 |
| 12-12 | calculating cumulative intervals using over | 141 |
| 12-13 | using justify_interval() to better format cumulative trip duration | 142 |
| listing | solution | num |
|---|---|---|
| 17 | creating a view that displays nevada 2019 counties | 238 |
| 17 | querying the nevada_counties_pop_2019 | 239 |
- Joe Celko's book