Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Test the database design by running the following queries on one of the tables.

ID: 3555215 • Letter: T

Question

Test the database design by running the following queries on one of the tables. You must submit the returned results for each query.

You can use my table as an example. My table consists of this:

CUSTOMER: First name,Last Name, Address, Home phone, Cell phone and email address.

( just give me examples or syntax of how to query this table? you can use my table or use examples, which ever you like. just want the syntax.)

query specifying specific columns

query using a column alias

query using the concatenation operator

query using a literal character string

query eliminating duplicate rows

query using the where clause and a comparison operators

query using the BETWEEN operator

query using the IN(LIST) operator

query using the LIKE operator

query using the IS NULL operator

query using the AND operator

query using the OR operator

query using the NOT operator

query using the ORDER BY clause ascending or descending

query where output is sorted by column alias

query that is sorted by multiple columns

query involving an equijoin

query involving an outer join

query involving a self join

query involving the NVL function

query involving the DECODE function

query involving the SUBSTR function

query involving the INSTR function

query involving the UPPER function

query involving the LOWER function

query involving the LPAD function

query involving the RPAD function

query involving the MONTHS_BETWEEN function

query involving the HAVING clause

query involving the Group by clause

query involving the count function

Explanation / Answer

query using a column alias

SQL Aliases

SELECT column_name AS alias_name
FROM table_name;


query using the ORDER BY clause ascending or descending


SELECT city, lastname, firstname
FROM Customers
ORDER BY city, lastname ASC

ORDER BY column1 DESC, column2


query using the NOT operator

CREATE TABLE PersonsNotNull
(
P_Id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255)
)


SQL ORDER BY Syntax

SELECT column_name,column_name
FROM table_name
ORDER BY column_name,column_name ASC|DESC;

query where output is sorted by column alias

SELECT COUNT (qsID) AS qsID_COUNT FROM TAB_IDS


query eliminating duplicate rows


SELECT DISTINCT column1, column2,.....columnN
FROM table_name
WHERE [condition]

query using the where clause and a comparison operators

SELECT * FROM class WHERE property operator constant
SELECT * FROM class WHERE constant operator property


query using a literal character string

SELECT * FROM responses WHERE field_id LIKE '3_%'

query using the BETWEEN operator

SELECT column_name(s)
FROM table_name
WHERE column_name BETWEEN value1 AND value2;

query using the AND operator

SELECT * FROM Customers
WHERE Country='Germany'
AND City='Berlin';


SQL IN Syntax

SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1,value2,...);


SQL LIKE Syntax

SELECT column_name(s)
FROM table_name
WHERE column_name LIKE pattern;

query using the AND operator


SELECT * FROM Customers
WHERE City='Berlin'
OR City='M

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote