[leetcode][Database][Hard] 2362. Generate the Invoice

1 · ZhengWei, Liu · Dec. 18, 2022, 9:10 p.m.
Description Table: Products +-------------+------+ | Column Name | Type | +-------------+------+ | product_id | int | | price | int | +-------------+------+ product_id is the primary key for this table. Each row in this table shows the ID of a product and the price of one unit. Table: Purchases +-------------+------+ | Column Name | Type | +-------------+------+ | invoice_id | int | | product_id | int | | quantity | int | +-------------+------+ (invoice_id, product_id) is the primary key for thi...