home / sakila

rental

21 rows where customer_id = 94

✎ 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
127 2005-05-25 21:10:40.000 2026 2026 94 94 2005-06-02 21:38:40.000 1 1 2020-12-23 07:15:21
629 2005-05-28 17:19:15.000 1527 1527 94 94 2005-06-02 20:01:15.000 2 2 2020-12-23 07:15:28
1213 2005-06-15 03:14:05.000 3191 3191 94 94 2005-06-15 21:41:05.000 2 2 2020-12-23 07:15:36
1367 2005-06-15 14:25:17.000 1505 1505 94 94 2005-06-21 19:15:17.000 1 1 2020-12-23 07:15:38
1734 2005-06-16 15:49:30.000 1113 1113 94 94 2005-06-22 13:52:30.000 2 2 2020-12-23 07:15:43
2620 2005-06-19 08:06:29.000 3183 3183 94 94 2005-06-24 11:42:29.000 1 1 2020-12-23 07:15:56
2816 2005-06-19 20:04:23.000 2180 2180 94 94 2005-06-20 21:09:23.000 2 2 2020-12-23 07:15:58
4044 2005-07-07 03:22:23.000 3263 3263 94 94 2005-07-13 03:23:23.000 1 1 2020-12-23 07:16:16
4287 2005-07-07 15:37:31.000 3558 3558 94 94 2005-07-16 19:59:31.000 2 2 2020-12-23 07:16:20
5719 2005-07-10 11:07:40.000 2100 2100 94 94 2005-07-15 14:14:40.000 2 2 2020-12-23 07:16:41
5970 2005-07-11 00:04:50.000 1514 1514 94 94 2005-07-19 03:36:50.000 1 1 2020-12-23 07:16:45
7809 2005-07-28 07:59:46.000 4150 4150 94 94 2005-08-02 02:56:46.000 1 1 2020-12-23 07:17:12
7979 2005-07-28 14:16:30.000 3303 3303 94 94 2005-08-03 09:39:30.000 2 2 2020-12-23 07:17:14
9605 2005-07-31 03:50:07.000 1477 1477 94 94 2005-08-07 09:15:07.000 2 2 2020-12-23 07:17:38
12316 2005-08-18 06:16:09.000 4325 4325 94 94 2005-08-27 05:54:09.000 2 2 2020-12-23 07:18:16
13786 2005-08-20 12:13:24.000 515 515 94 94 2005-08-28 07:24:24.000 2 2 2020-12-23 07:18:37
14804 2005-08-22 00:51:25.000 372 372 94 94 2005-08-26 21:15:25.000 1 1 2020-12-23 07:18:52
14865 2005-08-22 03:06:38.000 3775 3775 94 94 2005-08-23 04:26:38.000 1 1 2020-12-23 07:18:53
14978 2005-08-22 07:13:15.000 699 699 94 94 2005-08-25 12:26:15.000 1 1 2020-12-23 07:18:54
15371 2006-02-14 15:16:03.000 3672 3672 94 94   2 2 2020-12-23 07:19:00
15693 2005-08-23 10:00:24.000 748 748 94 94 2005-08-25 08:23:24.000 1 1 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 9.786ms