Skip to content

Instantly share code, notes, and snippets.

@gmyrianthous
Last active September 4, 2022 14:01
Show Gist options
  • Save gmyrianthous/36680c0f143e05e4c201789da41cae02 to your computer and use it in GitHub Desktop.
Save gmyrianthous/36680c0f143e05e4c201789da41cae02 to your computer and use it in GitHub Desktop.
Rows in example rental table
SELECT * FROM rental;
/*
|id |customer_id|store_id|amount|status |notes|rental_date |return_date |
|---|-----------|--------|------|------------|-----|----------------------|----------------------|
| 1 | 100 | 4 | 12.49| "completed"| | "2021-05-01 12:45:39"| "2021-05-03 15:10:02"|
| 3 | 100 | 4 | 5.68 | "on_rental"| | "2022-10-01 12:45:39"| |
| 2 | 58 | 2 | 9.32 | "on_rental"| | "2022-09-01 08:21:32"| |
| 4 | 100 | 4 | 1.67 | "completed"| | "2022-09-01 08:21:32"| "2022-09-02 09:21:22"|
| 5 | 100 | 6 | 2.67 | "completed"| | "2022-05-01 08:21:32"| "2022-05-02 09:21:22"|
| 6 | 100 | 6 | 0.49 | "completed"| | "2022-05-03 08:21:32"| "2022-05-04 09:21:22"|
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment