Question

In: Computer Science

SUPPLIERS(SupplierID, SupplierName, ContactName, Address, City, PostalCode, Country, Phone) CUSTOMERS(CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country) 1.Show...

SUPPLIERS(SupplierID, SupplierName, ContactName, Address, City, PostalCode, Country, Phone)

CUSTOMERS(CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country)

1.Show suppliers that do not have a PO Box but only show those whose name starts with a G or an N

2.Show suppliers that are located in countries from A to G and cities from N to Z LastName: I got # records in the output (result set).

3.Show the set of city and country combinations (listing each combination only once) where our customers are located and show them by country in reverse alphabetical order then by city alphabetically LastName: I got # records in the output (result set).

4.Show the customers in with names from P to Y who are based out of London or New York LastName: I got # records in the output (result set).

5.Show customers with names ending in r but who also have an r as the third or fifth letter too LastName: I got # records in the output (result set).

Solutions

Expert Solution

Here are the solution. Please do upvote if i answered yur question.

1.Show suppliers that do not have a PO Box but only show those whose name starts with a G or an N

select * from SUPPLIERS where PostalCode is null and (SupplierName like '%G' or SupplierName like '%N');

2.Show suppliers that are located in countries from A to G and cities from N to Z LastName: I got # records in the output (result set).

select * from SUPPLIERS where (Country >= 'A' and Country < 'G') and (City >= 'N' and City < 'Z');

3.Show the set of city and country combinations (listing each combination only once) where our customers are located and show them by country in reverse alphabetical order then by city alphabetically LastName: I got # records in the output (result set).

select distinct City, Country from CUSTOMERS order by Country desc, City;

4.Show the customers in with names from P to Y who are based out of London or New York LastName: I got # records in the output (result set).

select * from CUSTOMERS where (CustomerName >= 'P' and CustomerName < 'Y') and City in ('London', 'New York');

5.Show customers with names ending in r but who also have an r as the third or fifth letter too LastName: I got # records in the output (result set).

select * from CUSTOMERS where CustomerName like '%r' and SUBSTR(CustomerName,3,1) = 'r' and SUBSTR(CustomerName,5,1) = 'r';


Related Solutions

Problem: Read the following tables and answer the following questions: Customers Customer ID Name Address Phone...
Problem: Read the following tables and answer the following questions: Customers Customer ID Name Address Phone Email 9087 John Doe 204 University Ave. 987-098-9087 [email protected] 2098 Bill Lawrence 123 Jones St 717-387-3387 Business 2398 Laura Smith 0900 West Blvd. 901-234-4567 Information Transactions Customer ID Account Number Date of Last Transaction 9087 375 01/31/98 2098 123 03/09/97 2398 375 09/21/97 2098 375 12/31/97 2398 123 02/01/98 Accounts Account Number Balance Account Type 375 234.45 Checking 123 056.90 Savings 1. Who owns...
1. Which of the following is not a stakeholder in a business? employees suppliers customers competitors...
1. Which of the following is not a stakeholder in a business? employees suppliers customers competitors 2. Which of the following does NOT describe managerial accounting? not generally released to the public various formats are used used for the SEC filings used primarily for internal making 3. Jones company makes two products A & B. Here is some financial information about those products.                          A    B     Combined total cost of cost drivers Direct labor    $45,000 $35,000 Direct...
1. A U.S. company sells to customers in Canada and buys from suppliers in Singapore. At...
1. A U.S. company sells to customers in Canada and buys from suppliers in Singapore. At December 31, 2019, the company’s year-end, the following items are reported on its balance sheet: Accounts receivable (C$2,500,000)..…………………… $2,125,000 Accounts payable(S$1,400,000)………………………….. 1,061,200 On January 22, 2020, when the spot rate is $0.845/C$, the company collects C$1,000,000 from customers. It collects the remaining C$1,500,000 on February 16, 2020, when the spot rate is $0.856. On February 23, 2020, when the spot rate is $0.762, the...
Customers and suppliers are the foundation of the data that will be processed in your accounting...
Customers and suppliers are the foundation of the data that will be processed in your accounting system. Identify and discuss at least three (3) things you can do to ensure that processing customer and supplier transactions are handled efficiently and effectively in QuickBooks. Justify your response. Briefly describe the difference between a supplier and a vendor.
A cell phone company states that the mean cell phone bill of all their customers is...
A cell phone company states that the mean cell phone bill of all their customers is less than $83. A sample of 19 customers gives a sample mean bill of $82.17 and a sample standard deviation of $2.37. At ? = 0.05 , test the company’s claim? 1). State the hypothesis and label which represents the claim: : H 0 : H a 2). Specify the level of significance  = 3). Sketch the appropriate distribution, find and label the...
Why is it not necessary to model activities such as enteringinformation about customers or suppliers,...
Why is it not necessary to model activities such as entering information about customers or suppliers, mailing invoices to customers, and recording invoices received from suppliers as events in an REA diagram?
I need to add variables such as name, address and phone into a Jpanel in the...
I need to add variables such as name, address and phone into a Jpanel in the constructor called AddressBook. I then need to add that panel into a Jframe and call it in the main method how would i do that in java.
How are customers and suppliers affected by a firm’s working capital management decisions?
How are customers and suppliers affected by a firm’s working capital management decisions?
What are the dynamic capabilities of suppliers and customers in the Indian IT management industry?. What...
What are the dynamic capabilities of suppliers and customers in the Indian IT management industry?. What competencies are needed to exploit those capabilities? Can a competitor imitate those capabilities? Explain why.
CREATE TABLE Branch ( branchNo VARCHAR(4), address VARCHAR(50), city VARCHAR(30), state VARCHAR(2), phone VARCHAR(20), PRIMARY KEY...
CREATE TABLE Branch ( branchNo VARCHAR(4), address VARCHAR(50), city VARCHAR(30), state VARCHAR(2), phone VARCHAR(20), PRIMARY KEY (branchNo)); INSERT INTO Branch VALUES('B001','366 Tiger Ln','Los Angeles','CA','213-539-8600'); INSERT INTO Branch VALUES('B002','18 Harrison Rd','New Haven','CT','203-444-1818'); INSERT INTO Branch VALUES('B003','55 Waydell St','Essex','NJ','201-700-7007'); INSERT INTO Branch VALUES('B004','22 Canal St','New York','NY','212-055-9000'); INSERT INTO Branch VALUES('B005','1725 Roosevelt Ave','Queens','NY','718-963-8100'); INSERT INTO Branch VALUES('B006','1471 Jerrold Ave','Philadelphia','PA','267-222-5252'); CREATE TABLE Staff ( staffNo VARCHAR(4), fName VARCHAR(20), lName VARCHAR(20), position VARCHAR(20), sex VARCHAR(1), age INTEGER, salary NUMBER(8,2), phone VARCHAR(20), address VARCHAR(50), city VARCHAR(20),...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT