home / sakila

rental

23 rows where customer_id = 37

✎ 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
25 2005-05-25 03:21:20.000 3961 3961 37 37 2005-05-27 21:25:20.000 2 2 2020-12-23 07:15:20
923 2005-05-30 11:58:50.000 1884 1884 37 37 2005-06-05 09:57:50.000 1 1 2020-12-23 07:15:32
1583 2005-06-16 04:44:23.000 270 270 37 37 2005-06-18 03:44:23.000 1 1 2020-12-23 07:15:41
1812 2005-06-16 21:08:46.000 751 751 37 37 2005-06-21 15:44:46.000 2 2 2020-12-23 07:15:44
1854 2005-06-17 00:43:57.000 119 119 37 37 2005-06-23 05:49:57.000 1 1 2020-12-23 07:15:45
3472 2005-07-05 22:56:33.000 841 841 37 37 2005-07-13 17:18:33.000 2 2 2020-12-23 07:16:07
3734 2005-07-06 11:40:27.000 4569 4569 37 37 2005-07-14 12:08:27.000 1 1 2020-12-23 07:16:11
5425 2005-07-09 21:02:26.000 531 531 37 37 2005-07-16 23:38:26.000 2 2 2020-12-23 07:16:37
7939 2005-07-28 12:45:47.000 2004 2004 37 37 2005-07-30 18:32:47.000 2 2 2020-12-23 07:17:13
8419 2005-07-29 06:54:48.000 4574 4574 37 37 2005-08-06 05:02:48.000 1 1 2020-12-23 07:17:21
9567 2005-07-31 02:36:11.000 3688 3688 37 37 2005-08-07 01:19:11.000 2 2 2020-12-23 07:17:37
10538 2005-08-01 12:22:41.000 686 686 37 37 2005-08-02 10:31:41.000 2 2 2020-12-23 07:17:51
11176 2005-08-02 10:39:43.000 1448 1448 37 37 2005-08-09 14:42:43.000 2 2 2020-12-23 07:18:00
13046 2005-08-19 09:21:10.000 965 965 37 37 2005-08-26 13:00:10.000 2 2 2020-12-23 07:18:26
13147 2005-08-19 12:55:09.000 3490 3490 37 37 2005-08-22 18:10:09.000 1 1 2020-12-23 07:18:27
13444 2005-08-20 00:00:24.000 2564 2564 37 37 2005-08-21 05:59:24.000 2 2 2020-12-23 07:18:32
13493 2005-08-20 01:33:36.000 2927 2927 37 37 2005-08-24 06:32:36.000 1 1 2020-12-23 07:18:33
14025 2005-08-20 21:19:36.000 4521 4521 37 37 2005-08-29 23:39:36.000 1 1 2020-12-23 07:18:41
14084 2005-08-20 23:42:46.000 900 900 37 37 2005-08-24 20:06:46.000 1 1 2020-12-23 07:18:42
14532 2005-08-21 15:15:03.000 2057 2057 37 37 2005-08-25 17:41:03.000 2 2 2020-12-23 07:18:48
15028 2005-08-22 09:03:44.000 4248 4248 37 37 2005-08-30 11:28:44.000 1 1 2020-12-23 07:18:55
15904 2005-08-23 17:32:19.000 179 179 37 37 2005-08-24 21:05:19.000 2 2 2020-12-23 07:19:08
16035 2005-08-23 22:08:04.000 549 549 37 37 2005-08-28 03:46:04.000 1 1 2020-12-23 07:19:10

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 17.602ms