-
Notifications
You must be signed in to change notification settings - Fork 0
/
regular-queries.sql
19 lines (16 loc) · 734 Bytes
/
regular-queries.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- regular queries
SELECT wins FROM soccer;
SELECT team_name, wins FROM soccer;
SELECT team_name, wins FROM soccer;
SELECT team_name, wins FROM soccer WHERE league = 'Premier League';
SELECT team_name, wins FROM soccer ORDER BY wins DESC;
SELECT team_name, wins FROM soccer WHERE wins > 20;
SELECT team_name, wins FROM soccer WHERE wins < 20;
-- regular text queries
SELECT team_name, wins FROM soccer WHERE team_name LIKE '%United%';
SELECT team_name, wins FROM soccer WHERE league = 'Premier League' AND wins > 20;
SELECT team_name FROM soccer WHERE team_name LIKE '%United%';
SELECT * FROM soccer
WHERE team_name LIKE ('%United%')
OR team_name IN ('Bayern Munich', 'Chelsea', 'Real Madrid', 'Barcelona')
ORDER BY league;