We are almost done. We only have one topic to cover — functions and procedures.
Download the class notes for day 7.
Just another CUNY Academic Commons site
We are almost done. We only have one topic to cover — functions and procedures.
Download the class notes for day 7.
This is an alternative to the previous post — Installing SQL Server Express in macOS.
INSTRUCTIONS:
We continue creating, dropping and altering data objects including data types. We have three (3) more days before the final.
Download the class notes for day 6.
We have started working with data types (VARCHAR(n), INT, FLOAT, etc.) and data objects (DATABASE, SCHEMA, TABLE, etc.).
Download the class notes for day 5.
By the way, have a good π Day.
Instructions:
Application/Utilities/Terminal.app
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew install docker
sudo docker pull mcr.microsoft.com/mssql/server:2017-latest
sudo docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<YourStrong!Passw0rd>' \ -p 1433:1433 --name sql1 \ -d mcr.microsoft.com/mssql/server:2017-latest
sudo docker ps -a
sudo docker exec -it sql1 "bash"
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '<YourNewStrong!Passw0rd>'
QUIT
Resources
So far, we have covered how JOIN tables, built-in functions to manipulate strings, numbers and even convert numbers (currencies and dates) to strings, GROUP BY and ORDER BY clauses and the structure of a SELECT statement.
SELECT table1.field1, table1.field2, ... table2.field1, table2.field2, ... table3.field1, table3.field2, ... FROM table1 INNER|LEFT|RIGHT JOIN table2 ON table1.shared_field1 = table2.shared_field1 AND table1.shared_field2 = table2.shared_field2 ... INNER|LEFT|RIGHT JOIN table3 ON table1.shared_field1 = table3.shared_field1 AND table1.shared_field2 = table3.shared_field2 ... WHERE condition1 AND|OR condition2 AND|OR condition3 ... GROUP BY table1.field1, table1.field2, ... table2.field1, table2.field2, ... table3.field1, table3.field2, ... ORDER BY table1.field1 ASC|DESC, table1.field2 ASC|DESC, ... table2.field1 ASC|DESC, table2.field2 ASC|DESC, ... table3.field1 ASC|DESC, table3.field2 ASC|DESC, ...
Download the class notes for day 4.
We have covered so far how to query data from one or multiple tables as well as how to manipulate data using built-in functions and adding logic using `CASE`.
Download the class notes for day 3.
We have started working with built-in functions to manipulate strings and numbers.
Download the class notes for day 2.
We have started a new course. You will learn the basics of SQL, which will prepare you for the Intermediate SQL course. It is time to have fun.
Download the class notes for day 1.
Congratulate yourself. You finished the Introduction to SQL course. You now have the foundation to work with SQL.
Download the class notes for day 10 (the final).