BEGIN; BEGIN select c_custkey, c_name, sum(l_extendedprice * (1 - l_discount)) as revenue, c_acctbal, n_name, c_address, c_phone, c_comment from customer, orders, lineitem, nation where c_custkey = o_custkey and l_orderkey = o_orderkey and o_orderdate >= date '1993-10-01' and o_orderdate < cast(date '1993-10-01' + interval '3 month' as date) and l_returnflag = 'R' and c_nationkey = n_nationkey group by c_custkey, c_name, c_acctbal, c_phone, n_name, c_address, c_comment order by revenue desc LIMIT 20; c_custkey | c_name | revenue | c_acctbal | n_name | c_address | c_phone | c_comment -----------+--------------------+------------------+-----------+---------------------------+---------------------------------------+-----------------+--------------------------------------------------------------------------------------------------------------------- 1237537 | Customer#001237537 | 884989.672882175 | 7840.17 | RUSSIA | FNG6WgB1mopyyY,ajQTU qUPW5o | 32-367-120-4327 | nag carefully about the regular packages. carefully reg 1116802 | Customer#001116802 | 830214.111650024 | 772.17 | JORDAN | JpGQT3IHoogqB3ZMrSrzhBrVFObr | 23-199-655-3770 | ests. quickly ironic deposits along the special requests a 508954 | Customer#000508954 | 826167.509321924 | 3072.07 | ETHIOPIA | zgafElAXecB3I7Ee1a9B | 15-880-510-9487 | ickly regular deposits. carefully regular instructions engage deposits. foxes are caref 1487503 | Customer#001487503 | 825996.595834737 | 5398.11 | IRAN | orychjo, O6c | 20-271-234-4401 | ccounts sleep carefully. furiously pending packages boost slyly after the quickly regular requests. pinto beans fro 1461247 | Customer#001461247 | 775992.082701621 | 3205.93 | SAUDI ARABIA | jQZKjwNqttmC0BohJoGA4U | 30-137-949-5375 | atterns sleep blithely. fluffily pending accounts sleep furiously from the ironic deposits! blithely even i 1316338 | Customer#001316338 | 765063.707906858 | 8682.95 | INDIA | bfz3FH qaULsV7oiCn66z6ezkZBpcl | 18-793-610-3832 | equests. regular, even excuses doze slyly against the blithely even accounts. slyly regular dinos 817849 | Customer#000817849 | 737664.730403037 | -380.3 | MOROCCO | 7gz7HbNoVNSbv23trx | 25-111-847-3201 | fully special accounts wake slyly among the sheaves. permanently brave requests use furiously amon 1335394 | Customer#001335394 | 731259.866911927 | 3978.53 | VIETNAM | mdNmISybrVNaIPSp | 31-760-271-2302 | slyly even instructions. carefully silent ideas 102358 | Customer#000102358 | 715001.88403749 | 3564.9 | BRAZIL | YpDpv0sP14F5xMUQbkDV,XGcMJypFV6jH | 12-941-212-8350 | y slyly regular multipliers. furiously regular deposits nag final excuses. slyly special accounts haggle re 1432624 | Customer#001432624 | 713512.639531451 | 205.08 | FRANCE | NTCV7qvJ0PgcULFci,VdAB,0ZbSEZRdnnz, | 16-550-232-2774 | ctions use regular requests. quickly bold somas cajole at the c 160528 | Customer#000160528 | 710673.337151557 | 3425.52 | INDONESIA | 6 2h0BtgTVFrbGbg7a7ThCOLvfvb2a8FOm2qs | 19-670-600-6340 | sly regular theodolites. bold, regular foxes cajole. 1345237 | Customer#001345237 | 707735.573205882 | 6905.22 | FRANCE | bhu14nxGOuDn2FldK6kidxkQt | 16-133-279-4001 | s according to the express, unusual acc 839816 | Customer#000839816 | 705643.297075225 | 2110.25 | UNITED STATES | AROroot0eKdCxq | 34-453-282-7925 | unusual requests haggle slyly alongside of the slyly unusual ideas. f 1136716 | Customer#001136716 | 695043.560788405 | 5886.01 | CHINA | uAIqfk27UKRIIBZLUvKDfUOyh | 28-729-762-5783 | e foxes. bold orbits impress slyly about the regular, regular theodolites; carefully exp 1439413 | Customer#001439413 | 690161.983756785 | 8808.65 | ETHIOPIA | WweMOTcCq4A8yHDL | 15-432-961-8772 | quick foxes are. fluffily regular deposits wake besides the sl 1392475 | Customer#001392475 | 685464.408752738 | 593.26 | SAUDI ARABIA | PHuNdZucsuZvpiKqcsBVPY0R jeHSBZL | 30-640-220-2095 | boldly-- slyly careful requests sleep after the slyly regular depo 616909 | Customer#000616909 | 684978.114870308 | 2660.84 | EGYPT | iKRlIpRSp65EFpPY47d | 14-185-768-2185 | uests. theodolites haggle abov 314272 | Customer#000314272 | 682212.636772266 | 5127.92 | UNITED STATES | sfg9XaV58yPqF7Wo0Akpif42GFh6 | 34-674-752-5199 | fix carefully deposits. even packages haggle. fluffily unusual platelets h 1472980 | Customer#001472980 | 677765.914534807 | 6003.36 | IRAQ | iie M4kwzvAwMV Hpvv | 21-506-776-4657 | s use slyly thinly final deposits. ironic pinto beans poach furiously bl 1486201 | Customer#001486201 | 674878.457465596 | -276.92 | JORDAN | TJhgKueFwrrtXLtenhlw sC2N | 23-611-797-4750 | ag. deposits along the blithely express instructions w (20 rows) COMMIT; COMMIT