Teman-teman saya minta tolong dikoreksi serta ditambahkan kueri yang saya
buat berikut ini:

select * from
( select p.prod_id, p.prod_name, p.prod_list_price list,count(s.prod_id) as
banyak
from product p, sales2 s
where p.prod_id=s.prod_id
group by p.prod_id, p.prod_name, p.prod_list_price
order by banyak desc
)
where rownum <=10;


Hasil running dari kueri di atas adalah sebagai berikut.

 PROD_ID PROD_NAME                                             LIST
BANYAK
----------
--------------------------------------------------
---------- ----------
        15 Envoy 256MB - 40GB
999.99
4
        18 Envoy Ambassador
1299.99
4
        13 5MP Telephoto Digital Camera                         899.99
3
        28 Unix/Windows 1-user pack
199.99
3
        25 SIMM- 8MB PCMCIAII card                              112.99
3
        14 17" LCD w/built-in HDTV Tuner
999.99
3
        24 PCMCIA modem/fax 28800 baud                        45.99
2
        27 Multimedia speakers- 3" cones
44.99
2
        16 Y Box
299.99          1
        17 Mini DV Camcorder with 3.5" Swivel LCD         1099.99          1

10 rows selected.

Saya bermaksud hanya menampilkan barang yang jumlahnya >= 3.
Untuk itu tolong teman-teman mengoreksi dan menambahkan kueri yang saya buat
di atas.

Sebelumnya saya ucapkan terima kasih

Best Regards

D'Sudi


[Non-text portions of this message have been removed]



--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.blogspot.com
Mirror: http://indooracle.wordpress.com
-----------------------------------------------

Bergabung dengan Indonesia Thin Client User Groups, 
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.blogspot.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indo-oracle/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Kirim email ke