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-11-01' and o_orderdate < cast(date '1993-11-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 -----------+--------------------+------------------+-----------+---------------------------+---------------------------------------+-----------------+------------------------------------------------------------------------------------------------------------- 361891 | Customer#000361891 | 859221.040637212 | 3273.34 | SAUDI ARABIA | wKPyClaA8FXzVmOE7OH68Cn ujxyP | 30-105-377-1699 | y unusual foxes against the deposits affix slyl 927328 | Customer#000927328 | 788417.483247772 | 9945.26 | JAPAN | 30q6Amp,lQg | 22-271-703-3829 | sly final instructions are. slyly pending deposits haggle slyly. final dolphins since the ide 156019 | Customer#000156019 | 784377.88120917 | 7762.5 | KENYA | 7L26WVLAXK7GbxgSp 0VWF0oGE17 | 24-935-589-6925 | special pinto beans nag. dolp 1367704 | Customer#001367704 | 782901.170475661 | 4843.02 | GERMANY | pzMZxFX37HvdGtN8HxZek4916XA7PlJlTQEi | 17-358-626-1768 | . blithely final somas nag qui 1116802 | Customer#001116802 | 772560.770392226 | 772.17 | JORDAN | JpGQT3IHoogqB3ZMrSrzhBrVFObr | 23-199-655-3770 | ests. quickly ironic deposits along the special requests a 705604 | Customer#000705604 | 771091.31734094 | 2551.13 | ARGENTINA | FmxH89Z2Gz4L9pY6AHfo7U,3 | 11-760-333-8978 | l ideas affix about the slyly final accounts. ideas haggle fur 909427 | Customer#000909427 | 755162.583774831 | 8837.74 | IRAN | oJXjfKXPK,8qUUDwWViXC5tMcooD | 20-484-919-7055 | ilent, regular requests wake slyly regular pinto beans. slyly unusual reque 751294 | Customer#000751294 | 749723.058957116 | 9740.35 | UNITED STATES | 5F2ineLPS2QGuZh | 34-217-742-7285 | elets across the sly, special braids ha 871684 | Customer#000871684 | 734706.041030294 | 753.52 | VIETNAM | 4rySemfILqIalTHd8IZ | 31-454-346-5315 | es dazzle slyly around the furiously final packages. blithely express deposits sleep 365548 | Customer#000365548 | 731459.586429022 | 7653.46 | KENYA | DoUESYrKsrcAkIoIxLSAQVxDl5qsz6dx2U5qy | 24-489-592-4454 | sts affix across the blithely regular somas. final, ironic theodolites wake. slyly f 76939 | Customer#000076939 | 725557.235394891 | 7780.16 | VIETNAM | 7QU9FtkEMeHBTpf89 | 31-131-628-5816 | ounts. brave packages sleep carefully slyly bold platel 429244 | Customer#000429244 | 719534.026163399 | 1148.09 | MOZAMBIQUE | 9TNNcsqOeKn9xvoZ | 26-611-684-7938 | structions along the carefully even packages haggle blithely ironic, final foxes. fluffily final re 982835 | Customer#000982835 | 719438.164693419 | 4991.79 | CANADA | InB1m0hn3Z1jMiAxMQf botNW5DR00uNi9w | 13-794-134-1531 | slyly at the permanent packages. furiously regular frays use quickly above the bli 102358 | Customer#000102358 | 714638.971759447 | 3564.9 | BRAZIL | YpDpv0sP14F5xMUQbkDV,XGcMJypFV6jH | 12-941-212-8350 | y slyly regular multipliers. furiously regular deposits nag final excuses. slyly special accounts haggle re 900979 | Customer#000900979 | 697926.229636164 | 4520.26 | VIETNAM | VY gJFyVr334vFnNps3m70OnyvMwinoLxs | 31-252-103-7074 | blithely ironic packages along the quick 561997 | Customer#000561997 | 694195.885789688 | 1490.31 | BRAZIL | 076tCmrlK96,YzIyn1G0Ov8Pxaclz1, | 12-380-327-9302 | e fluffily regular accounts. fu 822841 | Customer#000822841 | 693587.835177891 | 9826.34 | KENYA | YegKDa24ghUHejhD9GUgL6GNpToTlaKD8bTBZ | 24-127-277-1726 | the regular, ironic packages. silent Tiresias wake along the f 561175 | Customer#000561175 | 690760.535527834 | 9044.96 | IRAQ | uDGGd4SefaR9q7BwbcAzd6vxWsOj | 21-936-920-1049 | lly ironic theodolites. furiously final requests wake blithel 424573 | Customer#000424573 | 690444.677997594 | 9065.78 | SAUDI ARABIA | ICakyyt,Ltc2xEHkN2yawPD9NOvLZ0 | 30-117-611-3828 | press instructions detect ironic packages. slyly express pinto 1041028 | Customer#001041028 | 689993.191408317 | 2301.61 | PERU | NWOaDijlcKcRSIfhBQ n8 gSaS3YuQYa0Qj | 27-808-597-3931 | ar deposits sleep furiously quickly pending frets. final foxes boost blithely slyly regular requests. bl (20 rows) COMMIT; COMMIT