1677. Product's Worth Over Invoices
Description
+-------------+---------+
| Column Name | Type |
+-------------+---------+
| product\_id | int |
| name | varchar |
+-------------+---------+
product\_id is the primary key for this table.
This table contains the ID and the name of the product. The name consists of only lowercase English letters. No two products have the same name.+-------------+------+
| Column Name | Type |
+-------------+------+
| invoice\_id | int |
| product\_id | int |
| rest | int |
| paid | int |
| canceled | int |
| refunded | int |
+-------------+------+
invoice\_id is the primary key for this table and the id of this invoice.
product\_id is the id of the product for this invoice.
rest is the amount left to pay for this invoice.
paid is the amount paid for this invoice.
canceled is the amount canceled for this invoice.
refunded is the amount refunded for this invoice.ac
Last updated