Required: a. How many customer records are stored in the database? b. List customers who live in New York. c. List customers with credit limits greater than $50,000. d. List sales transactions made in July, 2018. e. What’s the number of total sales transactions made to each customer?

Respuesta :

Answer:

a- How many customer records are stored in the database

SQL Command for knowing number of customer records are stored is

SELECT COUNT(Customer Name) FROM tbl Customer ;

b- List customers who live in New york.

SQL Command for knowing number of customers who live in New york

SELECT Customer State, FROM tbl Customer WHERE CITY = 'New york' ;

c- List customers who credit limits grater than $50,000.

SQL Command for knowing number of customers who's credit limit is grater than $50,000

SELECT Customer Credit Limit, FROM tbl Customer WHERE Credit limit > 50,000 ;

d. List sales transaction made in July - 18

SQL Command for knowing sales in July - 18

SELECT InvoiceDate, FROM tbl Sales ;

e. What the number of total sales transactions made to each customer