home / sakila

rental

27 rows where customer_id = 36

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

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

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
349 2005-05-27 04:53:11.000 2920 2920 36 36 2005-05-28 06:33:11.000 2 2 2020-12-23 07:15:24
716 2005-05-29 04:35:29.000 85 85 36 36 2005-06-01 07:42:29.000 2 2 2020-12-23 07:15:29
2741 2005-06-19 16:05:41.000 1662 1662 36 36 2005-06-20 20:48:41.000 1 1 2020-12-23 07:15:57
4135 2005-07-07 08:15:03.000 3384 3384 36 36 2005-07-11 10:56:03.000 1 1 2020-12-23 07:16:18
4560 2005-07-08 04:58:48.000 303 303 36 36 2005-07-10 04:27:48.000 1 1 2020-12-23 07:16:24
4762 2005-07-08 14:54:42.000 390 390 36 36 2005-07-12 18:08:42.000 1 1 2020-12-23 07:16:27
5403 2005-07-09 20:07:09.000 3991 3991 36 36 2005-07-12 18:33:09.000 1 1 2020-12-23 07:16:36
6030 2005-07-11 02:37:51.000 95 95 36 36 2005-07-16 22:34:51.000 2 2 2020-12-23 07:16:46
7205 2005-07-27 09:06:13.000 2828 2828 36 36 2005-08-05 07:11:13.000 1 1 2020-12-23 07:17:03
7647 2005-07-28 01:35:17.000 3079 3079 36 36 2005-08-01 00:14:17.000 1 1 2020-12-23 07:17:09
7919 2005-07-28 11:59:45.000 2138 2138 36 36 2005-08-06 11:19:45.000 1 1 2020-12-23 07:17:13
8099 2005-07-28 18:35:12.000 3694 3694 36 36 2005-07-30 15:44:12.000 2 2 2020-12-23 07:17:16
8391 2005-07-29 05:52:50.000 2134 2134 36 36 2005-08-03 04:45:50.000 2 2 2020-12-23 07:17:20
8952 2005-07-30 03:20:38.000 4397 4397 36 36 2005-08-02 02:54:38.000 1 1 2020-12-23 07:17:28
9369 2005-07-30 18:52:19.000 3538 3538 36 36 2005-08-01 12:53:19.000 1 1 2020-12-23 07:17:35
9805 2005-07-31 11:11:10.000 4179 4179 36 36 2005-08-03 07:36:10.000 2 2 2020-12-23 07:17:41
10525 2005-08-01 11:53:17.000 3811 3811 36 36 2005-08-07 07:24:17.000 1 1 2020-12-23 07:17:51
10761 2005-08-01 20:25:35.000 3967 3967 36 36 2005-08-08 15:20:35.000 2 2 2020-12-23 07:17:54
10963 2005-08-02 03:48:17.000 4501 4501 36 36 2005-08-02 22:15:17.000 1 1 2020-12-23 07:17:57
10964 2005-08-02 03:56:23.000 2356 2356 36 36 2005-08-09 23:11:23.000 2 2 2020-12-23 07:17:57
11616 2005-08-17 04:00:01.000 2588 2588 36 36 2005-08-20 23:03:01.000 2 2 2020-12-23 07:18:06
11813 2005-08-17 12:06:54.000 1074 1074 36 36 2005-08-21 17:52:54.000 2 2 2020-12-23 07:18:09
13562 2005-08-20 04:31:45.000 4547 4547 36 36 2005-08-25 09:59:45.000 1 1 2020-12-23 07:18:34
13564 2005-08-20 04:34:46.000 678 678 36 36 2005-08-28 23:18:46.000 2 2 2020-12-23 07:18:34
13674 2005-08-20 08:30:54.000 3397 3397 36 36 2005-08-22 02:59:54.000 1 1 2020-12-23 07:18:35
14647 2005-08-21 19:15:33.000 3854 3854 36 36 2005-08-30 18:58:33.000 2 2 2020-12-23 07:18:50
15657 2005-08-23 08:42:40.000 1897 1897 36 36 2005-09-01 13:08:40.000 1 1 2020-12-23 07:19:04

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.624ms