home / sakila

rental

31 rows where customer_id = 214

✎ 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
242 2005-05-26 13:05:08.000 2095 2095 214 214 2005-06-02 15:26:08.000 1 1 2020-12-23 07:15:23
278 2005-05-26 17:40:58.000 182 182 214 214 2005-06-02 16:43:58.000 2 2 2020-12-23 07:15:23
1076 2005-05-31 10:14:31.000 2551 2551 214 214 2005-06-05 10:13:31.000 2 2 2020-12-23 07:15:34
1093 2005-05-31 12:32:26.000 2189 2189 214 214 2005-06-03 07:51:26.000 2 2 2020-12-23 07:15:34
1112 2005-05-31 15:51:39.000 2453 2453 214 214 2005-06-03 14:04:39.000 1 1 2020-12-23 07:15:34
1275 2005-06-15 07:55:43.000 950 950 214 214 2005-06-20 06:30:43.000 1 1 2020-12-23 07:15:37
2085 2005-06-17 17:30:56.000 2275 2275 214 214 2005-06-23 12:13:56.000 1 1 2020-12-23 07:15:48
2868 2005-06-20 00:08:58.000 1213 1213 214 214 2005-06-25 21:23:58.000 2 2 2020-12-23 07:15:59
4211 2005-07-07 11:50:41.000 2001 2001 214 214 2005-07-09 13:58:41.000 2 2 2020-12-23 07:16:19
4783 2005-07-08 16:09:24.000 3952 3952 214 214 2005-07-16 21:53:24.000 2 2 2020-12-23 07:16:27
4984 2005-07-09 00:35:31.000 1303 1303 214 214 2005-07-17 03:44:31.000 1 1 2020-12-23 07:16:30
5172 2005-07-09 09:31:27.000 4046 4046 214 214 2005-07-13 04:03:27.000 1 1 2020-12-23 07:16:33
6602 2005-07-12 07:50:24.000 2382 2382 214 214 2005-07-20 03:25:24.000 2 2 2020-12-23 07:16:54
7417 2005-07-27 16:58:33.000 2952 2952 214 214 2005-07-30 22:17:33.000 1 1 2020-12-23 07:17:06
7826 2005-07-28 08:35:51.000 1473 1473 214 214 2005-08-05 07:57:51.000 2 2 2020-12-23 07:17:12
8663 2005-07-29 15:33:18.000 1281 1281 214 214 2005-07-30 18:03:18.000 1 1 2020-12-23 07:17:24
10563 2005-08-01 13:06:03.000 1885 1885 214 214 2005-08-09 08:39:03.000 2 2 2020-12-23 07:17:52
10749 2005-08-01 20:02:01.000 2953 2953 214 214 2005-08-03 14:20:01.000 1 1 2020-12-23 07:17:54
11450 2005-08-02 20:45:54.000 2009 2009 214 214 2005-08-08 17:17:54.000 2 2 2020-12-23 07:18:04
11474 2005-08-02 21:53:08.000 574 574 214 214 2005-08-05 22:36:08.000 1 1 2020-12-23 07:18:04
12463 2005-08-18 11:31:34.000 30 30 214 214 2005-08-23 12:04:34.000 1 1 2020-12-23 07:18:17
13138 2005-08-19 12:30:01.000 3138 3138 214 214 2005-08-21 06:35:01.000 2 2 2020-12-23 07:18:27
13350 2005-08-19 20:44:00.000 3523 3523 214 214 2005-08-27 01:23:00.000 2 2 2020-12-23 07:18:30
13409 2005-08-19 22:36:26.000 873 873 214 214 2005-08-22 01:52:26.000 2 2 2020-12-23 07:18:31
13565 2005-08-20 04:38:52.000 3378 3378 214 214 2005-08-27 07:17:52.000 1 1 2020-12-23 07:18:34
13726 2005-08-20 10:08:40.000 2258 2258 214 214 2005-08-23 14:58:40.000 1 1 2020-12-23 07:18:36
13864 2005-08-20 14:59:55.000 3935 3935 214 214 2005-08-22 09:30:55.000 2 2 2020-12-23 07:18:38
14347 2005-08-21 08:42:31.000 3862 3862 214 214 2005-08-25 07:11:31.000 2 2 2020-12-23 07:18:46
14567 2005-08-21 16:27:25.000 3805 3805 214 214 2005-08-26 10:47:25.000 1 1 2020-12-23 07:18:49
15639 2005-08-23 08:03:25.000 42 42 214 214 2005-08-24 10:21:25.000 2 2 2020-12-23 07:19:04
15645 2006-02-14 15:16:03.000 3838 3838 214 214   2 2 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.224ms