set pagesize 40 SQL> set linesize 120 SQL> select id, name, suggested_whlsl_price 2 from s_product 3 where suggested_whlsl_price > 10 4 order by suggested_whlsl_price desc; ID NAME SUGGESTED_WHLSL_PRICE ---------- -------------------------------------------------- --------------------- 30321 Grand Prix Bicycle 1669 30326 Himalaya Bicycle 582 10013 Pro Ski Boot 410 10012 Ace Ski Boot 200 10011 Bunny Boot 150 20201 World Cup Net 123 50417 Griffey Glove 80 50419 Steinbach Glove 80 50418 Alomar Glove 75 40421 Alexeyer Pro Lifting Bar 65 32861 Safe-T Helmet 60 40422 Pro Curling Bar 50 50536 Winfield Bat 50 50532 Puckett Bat 47 41100 Prostar 100 Pound Weight 45 50530 Cabrera Bat 45 10023 Pro Ski Pole 40.95 41080 Prostar 80 Pound Weight 35 20108 World Cup Soccer Ball 28 41050 Prostar 50 Pound Weight 25 50273 Chapman Helmet 22.89 10022 Ace Ski Pole 21.95 30433 New Air Pump 20 30426 Himalaya Tires 18.25 10021 Bunny Ski Pole 16.25 30421 Grand Prix Bicycle Tires 16 41020 Prostar 20 Pound Weight 12 20106 Junior Soccer Ball 11 28 rows selected. SQL> select distinct title from s_emp; TITLE ------------------------- President Sales Representative Stock Clerk VP, Administration VP, Finance VP, Operations VP, Sales Warehouse Manager 8 rows selected. SQL> select id, Region_ID, city, country, manager_ID 2 from s_warehouse 3 where country <> 'USA'; ID REGION_ID CITY COUNTRY MANAGER_ID ---------- ---------- ------------------------------ ------------------------------ ---------- 10501 5 Bratislava Czechozlovakia 10 201 2 Sao Paolo Brazil 7 301 3 Lagos Nigeria 8 SQL> select s_customer.name, city, country, s_region.name 2 from s_customer, s_region 3 where credit_rating = 'EXCELLENT' and s_customer.region_ID = s_region.ID; NAME CITY COUNTRY -------------------------------------------------- ------------------------------ ------------------------------ NAME -------------------------------------------------- Unisports Sao Paolo Brazil South America Womansport Seattle USA North America Kam's Sporting Goods Hong Kong Asia Sportique Cannes France Europe Beisbol Si! San Pedro de Macon's Dominican Republic North America Futbol Sonora Nogales Mexico South America Kuhn's Sports Prague Czechoslovakia Europe Hamada Sport Alexandria Eqypt Africa / Middle East Big John's Sports Emporium San Francisco USA North America 9 rows selected. SQL> select last_name, first_Name, s_dept.name, start_date, title, salary 2 from s_emp, s_dept 3 where dept_ID = s_dept.ID and salary > 1000 4 order by salary desc; LAST_NAME FIRST_NAME NAME START_DAT TITLE ------------------------- ------------------------- ------------------------- --------- ------------------------- SALARY ---------- Velasquez Carmen Administration 03-MAR-90 President 2500 Ropeburn Audry Administration 04-MAR-90 VP, Administration 1550 Nguyen Mai Sales 22-JAN-92 Sales Representative 1525 Sedeghi Yasmin Sales 18-FEB-91 Sales Representative 1515 Giljum Henry Sales 18-JAN-92 Sales Representative 1490 Ngao LaDoris Operations 08-MAR-90 VP, Operations 1450 Quick-To-See Mark Finance 07-APR-90 VP, Finance 1450 Dumas Andre Sales 09-OCT-91 Sales Representative 1450 Nagayama Midori Sales 17-JUN-91 VP, Sales 1400 Magee Colin Sales 14-MAY-90 Sales Representative 1400 Maduro Elena Operations 07-FEB-92 Stock Clerk 1400 Havel Marta Operations 27-FEB-91 Warehouse Manager 1307 LAST_NAME FIRST_NAME NAME START_DAT TITLE ------------------------- ------------------------- ------------------------- --------- ------------------------- SALARY ---------- Catchpole Antoinette Operations 09-FEB-92 Warehouse Manager 1300 Menchu Roberta Operations 14-MAY-90 Warehouse Manager 1250 Urguhart Molly Operations 18-JAN-91 Warehouse Manager 1200 Nozaki Akira Operations 09-FEB-91 Stock Clerk 1200 Biri Ben Operations 07-APR-90 Warehouse Manager 1100 Schwartz Sylvie Operations 09-MAY-91 Stock Clerk 1100 18 rows selected. SQL> select s_customer.name, date_ordered, quantity, price, suggested_whlsl_price 2 from s_customer, s_ord, s_item, s_product 3 where s_product.name = 'World Cup Soccer Ball' 4 and s_customer.id = s_ord.customer_ID and s_ord.id = s_item.ord_ID and s_product.id = s_item.product_ID 5 order by date_ordered; NAME DATE_ORDE QUANTITY PRICE SUGGESTED_WHLSL_PRICE -------------------------------------------------- --------- ---------- ---------- --------------------- Sportique 01-SEP-92 100 28 28 Futbol Sonora 07-SEP-92 46 28 28 Kuhn's Sports 07-SEP-92 22 28 28 SQL> select avg(salary) from s_emp; AVG(SALARY) ----------- 1255.08 SQL> select max(quantity) from s_item where price > 20; MAX(QUANTITY) ------------- 1500 SQL>