today:
172
yesterday:
251
Total:
1,112,106

-- Customer by Order --
SELECT distinct c.CUSTOMER_ID , initcap(C.CUST_FIRST_NAME || ' ' || C.CUST_LAST_NAME)  Name, o.ORDER_ID, O.ORDER_TOTAL  
FROM DEMO_CUSTOMERS C, DEMO_ORDERS O, DEMO_ORDER_ITEMS I
where C.CUSTOMER_ID   = O.CUSTOMER_ID   and
      I.ORDER_ID = O.ORDER_ID


-- Customer by Product --
SELECT distinct c.CUSTOMER_ID , initcap(C.CUST_FIRST_NAME || ' ' || C.CUST_LAST_NAME)  Name, p.product_id, P.PRODUCT_DESCRIPTION  
FROM DEMO_CUSTOMERS C, DEMO_ORDERS O, DEMO_ORDER_ITEMS I,  DEMO_PRODUCT_INFO P
where C.CUSTOMER_ID (+)  = O.CUSTOMER_ID   and
      I.ORDER_ID = O.ORDER_ID and
      I.PRODUCT_ID = p.product_id


-- Customer by Order and Product --
SELECT distinct c.CUSTOMER_ID , initcap(C.CUST_FIRST_NAME || ' ' || C.CUST_LAST_NAME)  Name, i.order_item_id,  p.product_id, P.PRODUCT_DESCRIPTION  
FROM DEMO_CUSTOMERS C, DEMO_ORDERS O, DEMO_ORDER_ITEMS I,  DEMO_PRODUCT_INFO P
where C.CUSTOMER_ID (+)  = O.CUSTOMER_ID   and
      I.ORDER_ID = O.ORDER_ID and
      I.PRODUCT_ID = p.product_id (+)


-- Customer By Order & Non Order --
SELECT c.CUSTOMER_ID,  initcap(C.CUST_FIRST_NAME || ' ' || C.CUST_LAST_NAME)  Name,  min(O.ORDER_ID) Order_id
FROM DEMO_CUSTOMERS C, DEMO_ORDERS O
where C.CUSTOMER_ID  = O.CUSTOMER_ID (+)
        group by c.CUSTOMER_ID, C.CUST_FIRST_NAME, C.CUST_LAST_NAME order by c.customer_id

No. Subject Author Date Views
29 Group by, Order by (두개의 Table을 활용한 Sub Total / 최고값 ) admin 2016.05.06 345
28 EMPLOYEE_LEVEL_ID admin 2016.05.03 145
27 HEAD TITLE (제목)을 조건에 따라 바꾸기 admin 2016.05.03 194
26 APEX ADMIN PASSWORD 바꾸기 admin 2016.05.02 160
25 wwv_flow_files admin 2016.05.01 199
24 EXPORT & IMPORT admin 2016.05.01 285
23 Outer Join with Oracle SQL admin 2016.04.29 206
» Report by Order / Product / Order and Product / By Order & Non Order admin 2016.04.29 288
21 Delimiter admin 2016.04.29 188
20 SQL SELECT DISTINCT Statement admin 2016.04.29 234
19 TAP ( Main & Sub ) / Button 의 Switch admin 2016.04.28 221
18 COUNT admin 2016.04.28 206
17 CREATING A TABLE / SEQUENCE / TRIGGER admin 2016.04.28 246
16 CREATE (INSERT) PROCESS admin 2016.04.28 206
15 DELETE PROCESS admin 2016.04.28 222
14 Global & Custom Serach file admin 2016.04.28 187
13 INSERT PROCESS admin 2016.04.28 214
12 JAVA for delete admin 2016.04.28 203
11 LIST OF VALUE (DYNAMIC) admin 2016.04.28 181
10 MAX admin 2016.04.28 211