home / sakila

rental

27 rows where customer_id = 13

✎ 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
1933 2005-06-17 06:54:42.000 980 980 13 13 2005-06-26 02:00:42.000 1 1 2020-12-23 07:15:46
2209 2005-06-18 02:24:01.000 2441 2441 13 13 2005-06-22 04:13:01.000 2 2 2020-12-23 07:15:50
2952 2005-06-20 06:26:57.000 3759 3759 13 13 2005-06-22 11:51:57.000 1 1 2020-12-23 07:16:00
3047 2005-06-20 12:45:33.000 624 624 13 13 2005-06-29 13:09:33.000 2 2 2020-12-23 07:16:01
3946 2005-07-06 21:39:24.000 294 294 13 13 2005-07-11 16:10:24.000 1 1 2020-12-23 07:16:15
6118 2005-07-11 07:43:08.000 3013 3013 13 13 2005-07-20 03:17:08.000 1 1 2020-12-23 07:16:47
6568 2005-07-12 05:45:47.000 4203 4203 13 13 2005-07-15 05:18:47.000 2 2 2020-12-23 07:16:53
6870 2005-07-12 20:13:45.000 3102 3102 13 13 2005-07-16 22:09:45.000 2 2 2020-12-23 07:16:58
6897 2005-07-12 21:30:41.000 170 170 13 13 2005-07-15 03:19:41.000 1 1 2020-12-23 07:16:58
7916 2005-07-28 11:49:53.000 3877 3877 13 13 2005-07-29 15:01:53.000 1 1 2020-12-23 07:17:13
8277 2005-07-29 01:38:53.000 1296 1296 13 13 2005-08-04 07:09:53.000 2 2 2020-12-23 07:17:19
8831 2005-07-29 22:37:41.000 3520 3520 13 13 2005-08-08 04:28:41.000 1 1 2020-12-23 07:17:27
9260 2005-07-30 14:38:22.000 3969 3969 13 13 2005-08-07 18:47:22.000 2 2 2020-12-23 07:17:33
9434 2005-07-30 21:29:41.000 3792 3792 13 13 2005-08-01 16:30:41.000 2 2 2020-12-23 07:17:36
9664 2005-07-31 06:12:08.000 360 360 13 13 2005-08-04 02:19:08.000 2 2 2020-12-23 07:17:39
9736 2005-07-31 08:58:40.000 2072 2072 13 13 2005-08-09 08:34:40.000 2 2 2020-12-23 07:17:40
10003 2005-07-31 17:48:51.000 1603 1603 13 13 2005-08-02 14:23:51.000 1 1 2020-12-23 07:17:44
11292 2005-08-02 14:58:41.000 210 210 13 13 2005-08-06 14:38:41.000 2 2 2020-12-23 07:18:02
11315 2005-08-02 16:05:17.000 1116 1116 13 13 2005-08-05 16:33:17.000 1 1 2020-12-23 07:18:02
11761 2005-08-17 09:44:59.000 2230 2230 13 13 2005-08-25 07:46:59.000 1 1 2020-12-23 07:18:08
12918 2005-08-19 04:31:36.000 972 972 13 13 2005-08-25 05:50:36.000 1 1 2020-12-23 07:18:24
13096 2005-08-19 10:49:03.000 420 420 13 13 2005-08-21 05:33:03.000 1 1 2020-12-23 07:18:27
13213 2005-08-19 15:25:48.000 1546 1546 13 13 2005-08-22 09:32:48.000 1 1 2020-12-23 07:18:28
13456 2005-08-20 00:33:19.000 1644 1644 13 13 2005-08-22 01:47:19.000 1 1 2020-12-23 07:18:32
14252 2005-08-21 05:44:07.000 2660 2660 13 13 2005-08-29 08:53:07.000 1 1 2020-12-23 07:18:44
14545 2005-08-21 15:44:23.000 2459 2459 13 13 2005-08-29 20:09:23.000 2 2 2020-12-23 07:18:48
15338 2005-08-22 20:51:24.000 502 502 13 13 2005-08-24 23:41:24.000 2 2 2020-12-23 07:19:00

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