forked from gvwilson/sql-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
88 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CREATE TABLE job( | ||
CREATE TABLE job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
CREATE TABLE work( | ||
CREATE TABLE work ( | ||
person text not null, | ||
job text not null | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,6 @@ pandas | |
polars | ||
pyarrow | ||
ruff | ||
sqlfluff | ||
sqlmodel | ||
sqlparse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
create table job( | ||
create table job ( | ||
name text not null, | ||
billable real not null | ||
); | ||
insert into job values | ||
('calibrate', 1.5), | ||
('clean', 0.5) | ||
; | ||
('clean', 0.5); | ||
select * from job; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
create table person( | ||
create table person ( | ||
ident integer primary key autoincrement, | ||
name text not null | ||
); | ||
insert into person values | ||
(null, 'mik'), | ||
(null, 'po'), | ||
(null, 'tay') | ||
; | ||
(null, 'tay'); | ||
select * from person; | ||
insert into person values (1, "prevented"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
select body_mass_g | ||
from penguins | ||
where body_mass_g > ( | ||
select avg(body_mass_g) | ||
from penguins | ||
select avg(body_mass_g) | ||
from penguins | ||
) | ||
limit 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
create table temp( | ||
create table temp ( | ||
num integer not null | ||
); | ||
insert into temp values (1), (5); | ||
select value from generate_series( | ||
select value from generate_series ( | ||
(select min(num) from temp), | ||
(select max(num) from temp) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.