home / sakila

rental

25 rows where customer_id = 572

✎ 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
559 2005-05-28 08:39:02.000 1227 1227 572 572 2005-06-05 08:38:02.000 2 2 2020-12-23 07:15:27
1889 2005-06-17 04:05:12.000 3909 3909 572 572 2005-06-26 04:13:12.000 1 1 2020-12-23 07:15:45
2007 2005-06-17 11:47:17.000 1123 1123 572 572 2005-06-21 07:19:17.000 1 1 2020-12-23 07:15:47
2458 2005-06-18 19:39:05.000 599 599 572 572 2005-06-21 13:54:05.000 2 2 2020-12-23 07:15:53
4601 2005-07-08 06:49:10.000 3184 3184 572 572 2005-07-09 07:43:10.000 1 1 2020-12-23 07:16:25
5595 2005-07-10 04:33:45.000 264 264 572 572 2005-07-16 04:04:45.000 1 1 2020-12-23 07:16:39
5713 2005-07-10 10:46:15.000 1213 1213 572 572 2005-07-19 14:34:15.000 1 1 2020-12-23 07:16:41
6108 2005-07-11 07:19:24.000 4296 4296 572 572 2005-07-13 12:38:24.000 2 2 2020-12-23 07:16:47
7161 2005-07-27 07:26:32.000 378 378 572 572 2005-08-03 01:26:32.000 2 2 2020-12-23 07:17:02
7345 2005-07-27 14:29:53.000 2434 2434 572 572 2005-08-03 18:38:53.000 2 2 2020-12-23 07:17:05
7713 2005-07-28 04:32:14.000 2018 2018 572 572 2005-08-03 04:30:14.000 2 2 2020-12-23 07:17:10
8342 2005-07-29 04:45:05.000 3301 3301 572 572 2005-08-01 07:20:05.000 1 1 2020-12-23 07:17:20
8432 2005-07-29 07:13:33.000 3896 3896 572 572 2005-07-30 03:14:33.000 1 1 2020-12-23 07:17:21
9081 2005-07-30 08:09:58.000 3040 3040 572 572 2005-08-03 13:27:58.000 1 1 2020-12-23 07:17:30
9950 2005-07-31 15:50:22.000 1657 1657 572 572 2005-08-08 19:10:22.000 2 2 2020-12-23 07:17:43
10204 2005-08-01 00:47:39.000 764 764 572 572 2005-08-05 01:11:39.000 1 1 2020-12-23 07:17:46
11114 2005-08-02 08:26:45.000 1273 1273 572 572 2005-08-03 08:41:45.000 2 2 2020-12-23 07:17:59
11121 2005-08-02 08:48:31.000 1025 1025 572 572 2005-08-04 05:08:31.000 2 2 2020-12-23 07:17:59
11415 2005-08-02 19:43:38.000 2197 2197 572 572 2005-08-10 15:13:38.000 1 1 2020-12-23 07:18:03
11426 2005-08-02 20:00:09.000 130 130 572 572 2005-08-09 01:30:09.000 2 2 2020-12-23 07:18:04
11526 2005-08-17 00:17:38.000 2419 2419 572 572 2005-08-18 03:59:38.000 2 2 2020-12-23 07:18:05
12256 2005-08-18 04:09:39.000 2975 2975 572 572 2005-08-22 01:53:39.000 2 2 2020-12-23 07:18:15
13377 2005-08-19 21:32:23.000 1316 1316 572 572 2005-08-25 22:24:23.000 1 1 2020-12-23 07:18:31
13523 2005-08-20 02:47:03.000 163 163 572 572 2005-08-28 07:43:03.000 1 1 2020-12-23 07:18:33
13688 2005-08-20 08:59:38.000 1116 1116 572 572 2005-08-28 04:54:38.000 2 2 2020-12-23 07:18:36

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