Question: SQL can be used on a nonrelational database Question 1 options: True False Question 2 Using the table named Customers CustomerID FirstName LastName Age State
SQL can be used on a nonrelational database
Question 1 options:
| True | |
| False |
Question 2
Using the table named Customers
| CustomerID | FirstName | LastName | Age | State |
| 1000 | John | Smith | 25 | TN |
| 1001 | Sue | Jones | 37 | TN |
| 1002 | Don | Mitchell | 53 | GA |
| 1003 | Frank | Gregory | 45 | TN |
| 1004 | Ted | White | 36 | KY |
| 1005 | Reggie | Marshell | 47 | KY |
Write a SQL query that will return all fields from the table.
Question 3
Using the table named Customers
| CustomerID | FirstName | LastName | Age | State |
| 1000 | John | Smith | 25 | TN |
| 1001 | Sue | Jones | 37 | TN |
| 1002 | Don | Mitchell | 53 | GA |
| 1003 | Frank | Gregory | 45 | TN |
| 1004 | Ted | White | 36 | KY |
| 1005 | Reggie | Marshell | 47 | KY |
Write a SQL query that will return the First Name, Last Name, and age fields.
Question 4 (4 points)
Using the table named Customers
| CustomerID | FirstName | LastName | Age | State |
| 1000 | John | Smith | 25 | TN |
| 1001 | Sue | Jones | 37 | TN |
| 1002 | Don | Mitchell | 53 | GA |
| 1003 | Frank | Gregory | 45 | TN |
| 1004 | Ted | White | 36 | KY |
| 1005 | Reggie | Marshell | 47 | KY |
Write a SQL query that will return the list of states where they have customers (no duplicates).
Question 5 (4 points)
Using the table named Customers
| CustomerID | FirstName | LastName | Age | State |
| 1000 | John | Smith | 25 | TN |
| 1001 | Sue | Jones | 37 | TN |
| 1002 | Don | Mitchell | 53 | GA |
| 1003 | Frank | Gregory | 45 | TN |
| 1004 | Ted | White | 36 | KY |
| 1005 | Reggie | Marshell | 47 | KY |
Write a SQL query that will return First Name and Last Name for all people who are older than 40 and do not live in TN.
Question 6 (4 points)
Using the table named Customers
| CustomerID | FirstName | LastName | Age | State |
| 1000 | John | Smith | 25 | TN |
| 1001 | Sue | Jones | 37 | TN |
| 1002 | Don | Mitchell | 53 | GA |
| 1003 | Frank | Gregory | 45 | TN |
| 1004 | Ted | White | 36 | KY |
| 1005 | Reggie | Marshell | 47 | KY |
Write a SQL query that will return First Name and Last Name for all people whose last name starts with a S or live in TN.
Question 7 (4 points)
Write a SQL query to create a database named "NewDB".
Question 8
Write a SQL query that will delete a database named "NewDB".
Question 9 (4 points)
Write a SQL query that will create a new table in an existing database named "oldDB". The new table will be named Customers and will contain the following fields:
- CustomerID (5 characters)
- FirstName (255 characters)
- LastName (255 characters)
- Age (numeric)
- State (2 characters)
Question 9 options:
Question 10 (4 points)
Write a SQL query that will delete a table named Customers" from a database named "oldDB".
Question 10 options:
Question 11 (4 points)
Using the table named Customers
| CustomerID | FirstName | LastName | Age | State |
| 1000 | John | Smith | 25 | TN |
| 1001 | Sue | Jones | 37 | TN |
| 1002 | Don | Mitchell | 53 | GA |
| 1003 | Frank | Gregory | 45 | TN |
| 1004 | Ted | White | 36 | KY |
| 1005 | Reggie | Marshell | 47 | KY |
Write a SQL query that will delete the column Age.
Question 12 (4 points)
Using the table named Customers
| CustomerID | FirstName | LastName | Age | State |
| 1000 | John | Smith | 25 | TN |
| 1001 | Sue | Jones | 37 | TN |
| 1002 | Don | Mitchell | 53 | GA |
| 1003 | Frank | Gregory | 45 | TN |
| 1004 | Ted | White | 36 | KY |
| 1005 | Reggie | Marshell | 47 | KY |
Write a SQL query that will add another record (1006, Sam, Black, 52, TN).
Question 12 options:
Question 13 (4 points)
Using the table named Customers
| CustomerID | FirstName | LastName | Age | State |
| 1000 | John | Smith | 25 | TN |
| 1001 | Sue | Jones | 37 | TN |
| 1002 | Don | Mitchell | 53 | GA |
| 1003 | Frank | Gregory | 45 | TN |
| 1004 | Ted | White | 36 | KY |
| 1005 | Reggie | Marshell | 47 | KY |
| 1006 | Sam | Black | 52 | TN |
Write a SQL query that will change the age of Sam Black (1006) from 52 to 42.
Question 14
Using the table named Customers
| CustomerID | FirstName | LastName | Age | State |
| 1000 | John | Smith | 25 | TN |
| 1001 | Sue | Jones | 37 | TN |
| 1002 | Don | Mitchell | 53 | GA |
| 1003 | Frank | Gregory | 45 | TN |
| 1004 | Ted | White | 36 | KY |
| 1005 | Reggie | Marshell | 47 | KY |
| 1006 | Sam | Black | 52 | TN |
Write a SQL query that will delete the Sam Black (1006) from the table.
Question 15 (4 points)
Using the table named Customers
| CustomerID | FirstName | LastName | Age | State |
| 1000 | John | Smith | 25 | TN |
| 1001 | Sue | Jones | 37 | TN |
| 1002 | Don | Mitchell | 53 | GA |
| 1003 | Frank | Gregory | 45 | TN |
| 1004 | Ted | White | 36 | KY |
| 1005 | Reggie | Marshell | 47 | KY |
| 1006 | Sam | Black | 52 | TN |
Write a SQL query that will print the maximum age and minimum age (done in one query).
Question 15 options:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
