HW2 - ------------11303 16.) SQL> edit Wrote...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
IS 158 HW #1 13.) SQL> edit Wrote file afiedt.buf 1 select * 2 from part 3* order by warehouse, part_num SQL> / PART DESCRIPTION ON_HAND CL W PRICE ---- --------------- --------- -- - --------- CD52 Microwave Oven 32 AP 1 165 KL62 Dryer 12 AP 1 349.95 BV06 Home Gym 45 SG 2 794.95 DR93 Gas Range 8 AP 2 495 KV29 Treadmill 9 SG 2 1390 AT94 Iron 50 HW 3 24.95 DL71 Cordless Drill 21 HW 3 129.95 DW11 Washer 12 AP 3 399.99
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
FD21 Stand Mixer 22 HW 3 159.95 KT03 Dishwasher 8 AP 3 595 10 rows selected. 14.) SQL> edit Wrote file afiedt.buf 1 select count(customer_name) 2 from customer 3* where balance > credit_limit SQL> / COUNT(CUSTOMER_NAME) -------------------- 2 15.)
Background image of page 2
SQL> edit Wrote file afiedt.buf 1 select sum(balance) 2 from customer 3 where rep_num = 65 4* and balance < credit_limit SQL> / SUM(BALANCE)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ------------11303 16.) SQL&gt; edit Wrote file afiedt.buf 1 select part_num, description, on_hand 2 from part 3 where on_hand &gt; 4 (select avg(on_hand) 5* from part) SQL&gt; / PART DESCRIPTION ON_HAND---- --------------- ---------AT94 Iron 50 BV06 Home Gym 45 CD52 Microwave Oven 32 FD21 Stand Mixer 22 17.) SQL&gt; select min(price) 2 from part; MIN(PRICE)----------24.95 18.) SQL&gt; edit Wrote file afiedt.buf 1 select part_num, description, price 2 from part 3 where price = 4 (select min(price) 5* from part) SQL&gt; / PART DESCRIPTION PRICE---- --------------- ---------AT94 Iron 24.95 19.) SQL&gt; select rep_num, sum(balance) 2 from customer 3 group by rep_num; RE SUM(BALANCE)-- ------------20 27533 35 8815.75 65 11303...
View Full Document

Page1 / 6

HW2 - ------------11303 16.) SQL&amp;amp;gt; edit Wrote...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online