Question: This is an SQL question and involve writing SELECT and DML statements involving a single table. The SQL should be written using the standard coding

This is an SQL question and involve writing SELECT and DML statements involving a single table.

The SQL should be written using the standard coding style:

all keywords are to be in upper case

all user-defined names are to be in lower case (example: table and field names)

there should be a carriage return before each major part of the SQL statement (i.e. before SELECT, FROM, WHERE and ORDER BY)

Example:

SELECT columns

FROM tables

WHERE conditions

ORDER BY column1, column2;

__________________________________________________________________

Display customer number for customers who have payments. Do not included any repeated values. Sort the result based on the customer number. (Hints: How do you know a customer has made a payment? You will need to access only one table for this query) The first 10 rows of the output result. The query returns 98 rows.

This is an SQL question and involve writing SELECT and DML statements

__________________________________________________________________

List customer numbers, check number, and amount for customers whose payment amount is not in the range of $1,500 to $120,000. Sort the output by top payments amount first.

involving a single table. The SQL should be written using the standard

_________________________________________________________________

The company needs to know the percentage markup for each product sold. Produce a query that outputs the ProductCode, ProductName, BuyPrice, MSRP in addition to - The difference between MSRP and BuyPrice (i.e. MSRP-BuyPrice) called markup - The percentage markup (100 * (markup / BuyPrice)) called percmarkup rounded to 1 decimal place. - Sort the result according to percmarkup. - Show products with percmarkup greater than 140.

coding style: all keywords are to be in upper case all user-defined

__________________________________________________________________

Display product code, product name, and quantity in stock the information of all products with the string co in their product name. (c and o can be lower or upper case). Sort the result according to quantity in stock.

names are to be in lower case (example: table and field names)

_____________________________________________________________________

Display customer number, contact first name, contact last name for all customers whose contact first name starts with letter s (both lowercase and uppercase) and includes letter e (both lowercase and uppercase). Sort the result according to customer number.

there should be a carriage return before each major part of the

1 2 3 5 6 7 CUSTOMERNUMBER 103 112 114 119 121 124 128 129 131 141 9 10 1 2 3 CUSTOMERNUMBER CHECKNUMBER AMOUNT 141 JE 105477 120166.58 121 FD317790 1491.38 381 MS154481 1128.2 398 JPMR 4544 615.45 MARKUP PRODUCTCODE PRODUCTNAME BUYPRICE MSRP 1 S18 2432 1926 Ford Fire Engine 24.92 60.77 35.85 2 S12 3990 1970 Plymouth Hemi Cuda 31.92 79.8 47.88 3 324 3420 1937 Horch 930V Limousine 26.3 65.75 39.45 + S18 2625 1936 Harley Davidson El Knucklehead 24.23 60.57 36.34 5 S24 4620 1961 Chevrolet Impala 32.33 80.84 48.51 PERCMARKUP 143.9 150 150 150 150 PRODUCTCODE PRODUCTNAME IS12 3891 1969 Ford Falcon 2 518 4721 1957 Corvette Convertible 3 524 2840 1958 Chevy Corvette Limited Edition 4 524 1444 1970 Dodge Coronet SS18 1662 1980s Black Hawk Helicopter 6 818 2957 1934 Ford V Coupe 7 318 3259 Collectable Wooden Train 8 524 3856 1956 Porsche 356A Coupe 924 3949 Corsair F4U ( Bird Cage) 10 312 3148 1969 Corvair Monza 11 S700 2610 The USS Constitution Ship 12 524 1937 1939 Chevrolet Deluxe Coupe 13 824 1628 1966 Shelby Cobra 427 S/C 14 S18 1342 1937 Lincoln Berline 15 518 2325 1932 Model A Ford J-Coupe 16 324 3432 2002 Chevy Corvette QUANTITYINSTOCK 1049 1249 2542 4074 5330 5649 6450 6600 6812 6906 7083 7332 8197 8693 9354 9446 1 2 3 CUSTOMERNUMBER CONTACTFIRSTNAME CONTACTLASTNAME 319 Steve Frick 450 Sue Frick 459 Sven Ottlieb 471 Sean clenahan 475 Steve Thompson 487 Sue Taylor 5 6 1 2 3 5 6 7 CUSTOMERNUMBER 103 112 114 119 121 124 128 129 131 141 9 10 1 2 3 CUSTOMERNUMBER CHECKNUMBER AMOUNT 141 JE 105477 120166.58 121 FD317790 1491.38 381 MS154481 1128.2 398 JPMR 4544 615.45 MARKUP PRODUCTCODE PRODUCTNAME BUYPRICE MSRP 1 S18 2432 1926 Ford Fire Engine 24.92 60.77 35.85 2 S12 3990 1970 Plymouth Hemi Cuda 31.92 79.8 47.88 3 324 3420 1937 Horch 930V Limousine 26.3 65.75 39.45 + S18 2625 1936 Harley Davidson El Knucklehead 24.23 60.57 36.34 5 S24 4620 1961 Chevrolet Impala 32.33 80.84 48.51 PERCMARKUP 143.9 150 150 150 150 PRODUCTCODE PRODUCTNAME IS12 3891 1969 Ford Falcon 2 518 4721 1957 Corvette Convertible 3 524 2840 1958 Chevy Corvette Limited Edition 4 524 1444 1970 Dodge Coronet SS18 1662 1980s Black Hawk Helicopter 6 818 2957 1934 Ford V Coupe 7 318 3259 Collectable Wooden Train 8 524 3856 1956 Porsche 356A Coupe 924 3949 Corsair F4U ( Bird Cage) 10 312 3148 1969 Corvair Monza 11 S700 2610 The USS Constitution Ship 12 524 1937 1939 Chevrolet Deluxe Coupe 13 824 1628 1966 Shelby Cobra 427 S/C 14 S18 1342 1937 Lincoln Berline 15 518 2325 1932 Model A Ford J-Coupe 16 324 3432 2002 Chevy Corvette QUANTITYINSTOCK 1049 1249 2542 4074 5330 5649 6450 6600 6812 6906 7083 7332 8197 8693 9354 9446 1 2 3 CUSTOMERNUMBER CONTACTFIRSTNAME CONTACTLASTNAME 319 Steve Frick 450 Sue Frick 459 Sven Ottlieb 471 Sean clenahan 475 Steve Thompson 487 Sue Taylor 5 6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!