Sei sulla pagina 1di 16

Republic of the Philippines

SURIGAO DEL SUR STATE UNIVERSITY


Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

Student ID: 17-0261 Student Name: JHON MARK C. PALEN


Professor: CRIZALDE R. MALAQUE Date of Submission: (03-3-2018)

Instructions:

Udemy.com is an online learning platform. It is aimed at professional adults. Unlike academic MOOC
programs driven by traditional collegiate coursework, Udemy provides a platform for experts of any kind
to create courses which can be offered to the public, either at no charge or for a tuition fee. Udemy is part
of the growing MOOC movement available outside the traditional university system, and has been noted
for the variety of courses offered.

To start with, access the LINK given below. Create your own account using your full name and other
correct details. This mini course contains five (5) sections with nine (9) quizzes and a Certificate of
Achievement once you successfully completed the course. Your task is to undertake such mini course for
one (1) week at your own pace, which you need to print screen all your activities including the quizzes.
Provide your professor with a scanned copy of your Certificate of Achievement as a tangible proof of
your successful learning experience.
I.
Title: “SQL: The Hitch Hikers Guide To Writing SQL Queries”
Creator(s) / Speaker(s) and Institution: Paul Scotchford, Data Analysist and Qlik Delopment Specialist
@ awari
Link: https://www.udemy.com/sql-the-hitch-hikers-guide-to-writing-sql-queries/

Course Description: The course is aimed at Beginners to Intermediate levels, which covers writing SQL
statements before progressing0 on to more advanced SQL for transforming and analysing data. The
course uses SQL Server 2014 express.

Tool Used: SQL Server 2014 Express

II. Section Title


Document your understanding about the contents, illustrations, and examples.

2.1 Sub-Section Title


Document your understanding about the contents, illustrations, and examples.

Section 1: Let's get started


They started Explain the use of tools Microsoft SQL Server 2014 because this
backend SQL is easy to use and as of now many programmer use this database
tools that because the highest capacity of data recording this software in my
undergraduate first launched with SQL Server 2005 that is used for configuring,
managing and administering all components within Microsoft SQL Server
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

A relational database for my


understanding about the explanation of
Paul Scotchford it is the unique Fieldname or
ID of the productid, transactionid,etc.

Section 2: SQL Foundation skills


I understand to write a good and correct query it is very important to understand
the logical processing of a query. It is sad that very few SQL programming
manuals start with that. Here is a look at the insides of logical query processing.
Sql foundation is good for me because I am stand alone and focusing the Visual
Studio 2013 and the backend is Sql server.
The Select, Update, delete etc.
Example code:
SELECT column(s)
FROM table / view
WHERE condition / expression
GROUP BY column(s)
ORDER BY column(s)
HAVING aggregate function and condition / expression

Section 3: Table joins, how they work

A SQL JOIN combines records from two tables, A JOIN locates related column
values in the two tables, A query can contain zero, one, or multiple JOIN
operations, INNER JOIN is the same as JOIN; the keyword INNER is optional.

My simple sample of code

SELECT column-names
FROM table-name1 JOIN table-name2
ON column-name1 = column-name2
WHERE condition

The key that refers to the entity being described in that table is called the primary
key (PK) and other key is called a foreign key (FK). The primary key consists of
one or more columns whose data contained within are used to uniquely identify
each row in the table. You can think of the primary key as an address. If the
rows in a table were mailboxes, then the primary key would be the listing of street
addresses while foreign key is a set of one or more columns in a table that refers
to the primary key in another table. There isn’t any special code, configurations,
or table definitions you need to place to officially “designate” a foreign key.

Primary Key Example:


Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

Foreign Key Example:

Section 4: Transform data using aggregation functions


I learn from udemy the different types of aggregation such as the following that
include AVG, COUNT, SUM, MIN, MAX, etc. An aggregate function ignores NULL
values when it performs calculation except for the COUNT function. The AVG
function calculates the average value of a set of values. It ignores NULL values in
the calculation. The COUNT function returns the number of the rows in a table. For
example, you can use the COUNT function to get the number of products in the
products table. The SUM function returns the sum of a set of values. The SUM
function ignores NULL values. If no matching row found, the SUM function returns
a NULL value. The MAX function returns the maximum value in a set of values.
The MIN function returns the minimum value in a set of values.

Examples: illustration
SELECT AVG(buyPrice) average_buy_price
FROM products

SELECT COUNT(*) AS Total


FROM products

SELECT productCode,sum(priceEach * quantityOrdered) total


FROM orderdetails
GROUP by productCode

SELECT P.productCode,
P.productName,
SUM(priceEach * quantityOrdered) total
FROM orderdetails O
INNER JOIN products P ON O.productCode = P.productCode
GROUP by productCode
ORDER BY total;
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

SELECT MAX(buyPrice) highest_price


FROM products;

SELECT MIN(buyPrice) lowest_price


FROM products;

Section 5: Bonus content to enhance your knowledge


This last section I learn to import database, backup database, how to use the case
statement because this section is to enhance your understanding the understanding of
previous section.
Example code:

1. INSERT INTO Customer (FirstName, LastName, City, Country, Phone)


2. VALUES ('Craig', 'Smith', 'New York', 'USA', 1-01-993 2800)

Quiz 1 Screenshot
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

Quiz 2 Screenshot
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

Quiz 3 Screenshot
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

Quiz 4 Screenshot
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

Quiz 5 Screenshot
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

Quiz 6 Screenshot
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

Quiz 7 Screenshot
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

Quiz 8 Screenshot

Quiz 9 Screenshot
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE
Republic of the Philippines
SURIGAO DEL SUR STATE UNIVERSITY
Tandag City, Surigao del Sur

GRADUATE SCHOOL
MASTER OF SCIENCE IN COMPUTER SCIENCE

Appendix: CERTIFICATE OF ACHIEVEMENT

Appendix: CERTIFICATE OF COMPLETION

Potrebbero piacerti anche