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

1. Write a query to display all customers with a grade above 100. 2. Write a que

ID: 3914371 • Letter: 1

Question

1. Write a query to display all customers with a grade above 100.

2. Write a query statement to display all customers in New York who have a grade value above 100.

3. Write a SQL statement to display all customers, who are either belongs to the city New York or had a grade above 100.

4. Write a SQL statement to display all the customers, who are either belongs to the city New York or not had a grade above 100. 5.Write a SQL query to display those customers who are neither belongs to the city New York nor grade value is more than 100.

6. Write a SQL statement to display either those orders which are not issued on date 2012-09-10 and issued by the salesman whose ID is 505 and below or those orders which purchase amount is 1000.00 and below

7. Display all in reverse, where order dates equal to a specified date or customer id greater than a specified number and purchase amount less than a specified amount.

8. Write a SQL query to display all orders where purchase amount less than a specified amount or order date and customer_id must not be greater than a specified data and less than a specified ID respectively

Explanation / Answer

1.
SELECT * FROM customer WHERE grade > 100

2.
SELECT * FROM customer WHERE city='New York' AND grade > 100

3.
SELECT * FROM customer WHERE city='New York' OR grade > 100

4.
Here not had a grade above 100 means grade less than or equal to 100

SELECT * FROM customer WHERE city='New York' OR grade <= 100

5.

SELECT * FROM customer WHERE NOT city = 'New York' AND grade <= 100

6.

SELECT * FROM orders WHERE (NOT ord_date = '2012-09-10' AND salesman_id <= 505) OR purch_amt <= 1000.00

7.
Here reversing data by Order number.

SELECT * FROM orders WHERE (order_date='specific_date' OR customer_id > specific_number) AND purch_amt < specific_amount ORDER BY ord_no ASC

8.

Here order_date must not be greater than specific date means order_date <= specific date.

SELECT * FROM orders WHERE purch_amt < specific_amount OR (ord_date <= 'specific_date' AND customer_id < specific_id)

Note: Change: specific_date, specific_amount, specific_id, specific_number with real data before run

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