CREATE TABLE CUSTOMER (
cusID VARCHAR(10) NOT NULL,
cusNAME VARCHAR(50),
CONSTRAINT CUSTOMER_PKEY PRIMARY KEY (cusID)
);
CREATE TABLE ORDERS (
cusID VARCHAR(10) NOT NULL,
item VARCHAR(25),
PPRICE NUMBER(12,2),
CONSTRAINT ORDERS_FKEY FOREIGN KEY (cusID) REFERENCES CUSTOMER(cusID)
);
我有这两个表,我想要一个查询结果
CUSNAME ITEM BOUGHT
JOHN 2
MAY 5
是否有可能做到这一点?类似 select cusNAME,COUNT(*) FROM CUSTOMER,ORDERS ........等等......不知道如何继续。