home / sakila

rental

19 rows where customer_id = 478

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
1708 2005-06-16 14:08:44.000 2259 2259 478 478 2005-06-19 08:35:44.000 1 1 2020-12-23 07:15:42
2358 2005-06-18 13:00:51.000 1728 1728 478 478 2005-06-26 12:58:51.000 1 1 2020-12-23 07:15:52
2529 2005-06-19 01:18:27.000 2306 2306 478 478 2005-06-24 00:26:27.000 1 1 2020-12-23 07:15:54
2616 2005-06-19 07:33:00.000 581 581 478 478 2005-06-28 03:05:00.000 1 1 2020-12-23 07:15:56
2765 2005-06-19 17:34:39.000 1017 1017 478 478 2005-06-27 23:26:39.000 1 1 2020-12-23 07:15:58
3259 2005-06-21 03:57:15.000 2751 2751 478 478 2005-06-24 03:32:15.000 1 1 2020-12-23 07:16:04
3691 2005-07-06 09:46:12.000 1937 1937 478 478 2005-07-07 14:08:12.000 1 1 2020-12-23 07:16:11
5837 2005-07-10 16:57:50.000 1648 1648 478 478 2005-07-18 14:07:50.000 2 2 2020-12-23 07:16:43
7522 2005-07-27 21:11:03.000 2038 2038 478 478 2005-08-02 16:40:03.000 1 1 2020-12-23 07:17:07
8488 2005-07-29 08:57:38.000 2176 2176 478 478 2005-08-02 04:16:38.000 1 1 2020-12-23 07:17:22
9665 2005-07-31 06:17:33.000 2863 2863 478 478 2005-08-04 08:53:33.000 1 1 2020-12-23 07:17:39
10016 2005-07-31 18:13:06.000 2183 2183 478 478 2005-08-09 22:11:06.000 1 1 2020-12-23 07:17:44
10127 2005-07-31 21:39:48.000 717 717 478 478 2005-08-06 00:10:48.000 1 1 2020-12-23 07:17:45
11906 2005-08-17 15:40:46.000 325 325 478 478 2005-08-20 15:20:46.000 2 2 2020-12-23 07:18:10
13162 2005-08-19 13:28:26.000 1845 1845 478 478 2005-08-24 17:37:26.000 1 1 2020-12-23 07:18:28
13507 2005-08-20 02:10:27.000 3324 3324 478 478 2005-08-23 04:03:27.000 2 2 2020-12-23 07:18:33
15027 2005-08-22 09:03:04.000 326 326 478 478 2005-08-29 04:03:04.000 2 2 2020-12-23 07:18:55
15188 2005-08-22 15:55:48.000 131 131 478 478 2005-08-29 19:10:48.000 1 1 2020-12-23 07:18:58
15724 2005-08-23 11:22:09.000 1025 1025 478 478 2005-08-28 12:56:09.000 2 2 2020-12-23 07:19:05

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE rental (
  rental_id INT NOT NULL,
  rental_date TIMESTAMP NOT NULL,
  inventory_id INT  NOT NULL,
  customer_id INT  NOT NULL,
  return_date TIMESTAMP DEFAULT NULL,
  staff_id SMALLINT  NOT NULL,
  last_update TIMESTAMP NOT NULL,
  PRIMARY KEY (rental_id),
  CONSTRAINT fk_rental_staff FOREIGN KEY (staff_id) REFERENCES staff (staff_id) ,
  CONSTRAINT fk_rental_inventory FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id) ,
  CONSTRAINT fk_rental_customer FOREIGN KEY (customer_id) REFERENCES customer (customer_id)
);
CREATE INDEX idx_rental_fk_inventory_id ON rental(inventory_id)
;
CREATE INDEX idx_rental_fk_customer_id ON rental(customer_id)
;
CREATE INDEX idx_rental_fk_staff_id ON rental(staff_id)
;
CREATE UNIQUE INDEX idx_rental_uq  ON rental (rental_date,inventory_id,customer_id)
;
Powered by Datasette · Queries took 10.941ms