0% found this document useful (0 votes)
3 views2 pages

Tutorial 7.Docx

The document consists of a tutorial with questions related to SQL, including explanations of the GROUP BY clause, differences between WHERE and HAVING clauses, and distinctions between subqueries and joins. It also includes practical SQL exercises such as inserting data into a table, updating records, and deleting entries. The tutorial emphasizes the importance of confirming changes and committing transactions in a database.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Tutorial 7.Docx

The document consists of a tutorial with questions related to SQL, including explanations of the GROUP BY clause, differences between WHERE and HAVING clauses, and distinctions between subqueries and joins. It also includes practical SQL exercises such as inserting data into a table, updating records, and deleting entries. The tutorial emphasizes the importance of confirming changes and committing transactions in a database.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Tutorial 7

Question 1:

Explain how the GROUP BY clause works. What is the difference between the
WHERE and HAVING clauses?

Question 2:

What is the difference between a subquery and a join? Under what circumstances
would you not be able to use a subquery?

SQL Practices

Question 3

Create an INSERT statement to add the first row of data to the EMPLOYEES table
from the following sample data. Do not list the columns in the INSERT clause.

ID LAST_NAME FIRST_NAME USERID SALARY


1 Patel Ralph rpatel 895
2 Dance Betty bdance 860
3 Biri Ben bbiri 1100
4 Newman Chad enewman 750
5 Ropeburn Audrey aropebur 1550

Question 4

Confirm your addition to the table.

Question 5

Change the last name of employee 3 to Drexler.

Question 6

Change the salary to $1000 for all employees with a salary less than $900

Question 7

Verify your changes to the table

Question 8

Delete Betty Dancs from the EMPLOYEES table


Question 9

Confirm your changes to the table

Question 10

Commit all pending changes

You might also like