-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassignments_section6.sql
More file actions
50 lines (18 loc) · 895 Bytes
/
assignments_section6.sql
File metadata and controls
50 lines (18 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
-- Connect to database
-- ASSIGNMENT 1: Duplicate values
-- View the students data
-- Create a column that counts the number of times a student appears in the table
-- Return student ids, names and emails, excluding duplicates students
-- ASSIGNMENT 2: Min / max value filtering
-- View the students and student grades tables
-- For each student, return the classes they took and their final grades
-- Return each student's top grade and corresponding class
-- ASSIGNMENT 3: Pivoting
-- Combine the students and student grades tables
-- View only the columns of interest
-- Pivot the grade_level column
-- Update the values to be final grades
-- Create the final summary table
-- ASSIGNMENT 4: Rolling calculations
-- Calculate the total sales each month
-- Add on the cumulative sum and 6 month moving average