We have arrived to the end of SF22SQL1001.
CREATE SCHEMA lab15; GO CREATE PROCEDURE lab15.thanks_sp AS BEGIN PRINT 'Thank you for being part of SF22SQL1001!' END; EXEC lab15.thanks_sp;
Download the class notes for day 10.
Just another CUNY Academic Commons site
We have arrived to the end of SF22SQL1001.
CREATE SCHEMA lab15; GO CREATE PROCEDURE lab15.thanks_sp AS BEGIN PRINT 'Thank you for being part of SF22SQL1001!' END; EXEC lab15.thanks_sp;
Download the class notes for day 10.
One more session to go before you hand me the final.
Download the class notes for day 9.
We are two (2) more sessions away from the SF22SQL1001 final.
We have covered lots of material —
I hope you have been having lots of fun.
Download the class notes for day 8 — 22 pages’ worth of material.
We are three (3) more sessions to go.
We have started using variables (DECLARE @parameter) in order to avoid re-writing code every time the values in the WHERE clause change. Parameters will also help us create our own functions.
Download the class notes for day 7 — 29 pages’ worth of material.
We have finally started making (CREATE), deleting (DROP) and changing (ALTER) data objects. We can now use all the material we have covered when getting data (SELECT) from tables and views in a database.
Download the class notes for day 6.
We are half-way done with the course. Can you handle having so much fun?
Download the class notes for day 5.
We continue working with functions. Some affect strings (RIGHT, LEFT, SUBSTRING, etc.) while others affect numbers (TIME, DATE, FORMAT, etc.) as well as aggregate functions, which need the GROUP BY clause.
SELECT field1, aggregate_function(field2), field3 -- other fields if any FROM table1 INNER|LEFT|RIGHT JOIN table2 ON table1.shared_data1 = table2.shared_data2 AND table1.shared_data2 = table2.shared_data2 -- other tables if any WHERE condition1 AND|OR condition2 -- other conditions if any GROUP BY field1 ORDER BY field1 ASC|DESC, field2 ASC|DESC, field3 ASC|DESC, ...; -- other fields if any
Download the class notes for day 4.
We have covered basic SELECT statements joining (INNER|LEFT|RIGHT JOIN) multiple tables, filtering data (WHERE) and organizing the output (ORDER BY) as well grouping values (GROUP BY) when using aggregate functions. Now we are having fun with SQL.
Download the class notes for day 3.
After enjoying some cookies on day 1, we can now work with code. Always keep in mind that your SQL code is read by an interpreter looking at each line and making sure that these lines are in order. Breaking the correct order will return an error.
Download the class notes for day 2.
We start a new class having chocolate cookies, but no coffee.
Download the class notes for day 1.