As you see in the picture below is the diagram,
(如下图所示,)
I need to create this query: List all information about ingredients purchased include the ingredient name, sorted by the date ordered.
(我需要创建此查询:列出有关购买的食材的所有信息,包括食材名称,按订购日期排序。)
Thanks
(谢谢)
The tables I have:
(我有的表:)
CREATE TABLE ingredient_purchase_list (
(创建表Ingredient_purchase_list()
ing_pl_id NUMBER(4,0) PRIMARY KEY, date_ordered DATE , quantity VARCHAR2(15), unit VARCHAR(15), unit_price NUMBER(4,2) NOT NULL, ingredient_id NUMBER(4,0),
(ing_pl_id NUMBER(4,0)主键,date_ordered DATE,数量VARCHAR2(15),单位VARCHAR(15),单价NUMBER(4,2)非空,Ingredient_id NUMBER(4,0),)
CONSTRAINT ingredient_id_fk FOREIGN KEY (ingredient_id) REFERENCES ingredient (ingredient_id));
(CONSTRAINT Ingredient_id_fk FOREIGN KEY(ingredient_id)参考成分(ingredient_id));)
CREATE TABLE ingredient
(
ingredient_id NUMBER(4,0) PRIMARY KEY,
ingredient_name VARCHAR2(100) NOT NULL
);
ask by Tiz translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…