home / sakila

rental

34 rows where customer_id = 566

✎ 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
234 2005-05-26 11:47:20.000 1321 1321 566 566 2005-06-03 10:39:20.000 2 2 2020-12-23 07:15:23
768 2005-05-29 12:30:46.000 2895 2895 566 566 2005-06-07 09:00:46.000 2 2 2020-12-23 07:15:30
1635 2005-06-16 08:26:56.000 1187 1187 566 566 2005-06-25 06:17:56.000 2 2 2020-12-23 07:15:41
1982 2005-06-17 10:12:15.000 1091 1091 566 566 2005-06-20 13:56:15.000 1 1 2020-12-23 07:15:46
2367 2005-06-18 14:00:31.000 4086 4086 566 566 2005-06-22 14:45:31.000 2 2 2020-12-23 07:15:52
3379 2005-06-21 13:54:58.000 2022 2022 566 566 2005-06-23 13:43:58.000 2 2 2020-12-23 07:16:06
3663 2005-07-06 08:15:47.000 2646 2646 566 566 2005-07-07 08:57:47.000 1 1 2020-12-23 07:16:10
3943 2005-07-06 21:22:17.000 1816 1816 566 566 2005-07-07 21:26:17.000 1 1 2020-12-23 07:16:15
3998 2005-07-06 23:49:20.000 1245 1245 566 566 2005-07-12 20:39:20.000 1 1 2020-12-23 07:16:15
5079 2005-07-09 05:20:40.000 3948 3948 566 566 2005-07-17 00:06:40.000 1 1 2020-12-23 07:16:32
6365 2005-07-11 21:17:40.000 4550 4550 566 566 2005-07-14 20:53:40.000 1 1 2020-12-23 07:16:50
7677 2005-07-28 02:56:37.000 4464 4464 566 566 2005-07-31 02:21:37.000 1 1 2020-12-23 07:17:10
7941 2005-07-28 12:47:20.000 439 439 566 566 2005-08-01 08:46:20.000 1 1 2020-12-23 07:17:13
8118 2005-07-28 19:22:22.000 331 331 566 566 2005-08-01 22:13:22.000 1 1 2020-12-23 07:17:16
8157 2005-07-28 21:06:45.000 915 915 566 566 2005-08-04 16:06:45.000 1 1 2020-12-23 07:17:17
8257 2005-07-29 01:03:20.000 3024 3024 566 566 2005-08-04 21:54:20.000 1 1 2020-12-23 07:17:18
8305 2005-07-29 03:08:47.000 3916 3916 566 566 2005-08-06 07:49:47.000 2 2 2020-12-23 07:17:19
8660 2005-07-29 15:26:59.000 3122 3122 566 566 2005-08-05 21:04:59.000 2 2 2020-12-23 07:17:24
8710 2005-07-29 17:26:03.000 3391 3391 566 566 2005-07-30 19:51:03.000 1 1 2020-12-23 07:17:25
8797 2005-07-29 21:10:37.000 2929 2929 566 566 2005-08-07 21:43:37.000 1 1 2020-12-23 07:17:26
9101 2005-07-30 08:47:13.000 3165 3165 566 566 2005-08-02 12:52:13.000 1 1 2020-12-23 07:17:31
9470 2005-07-30 23:01:31.000 3908 3908 566 566 2005-08-07 01:35:31.000 2 2 2020-12-23 07:17:36
9688 2005-07-31 06:56:08.000 1304 1304 566 566 2005-08-08 03:31:08.000 2 2 2020-12-23 07:17:39
9915 2005-07-31 14:52:26.000 2933 2933 566 566 2005-08-03 11:53:26.000 1 1 2020-12-23 07:17:43
10259 2005-08-01 02:52:05.000 1881 1881 566 566 2005-08-03 20:54:05.000 1 1 2020-12-23 07:17:47
10289 2005-08-01 03:39:48.000 3153 3153 566 566 2005-08-08 02:56:48.000 1 1 2020-12-23 07:17:48
11129 2005-08-02 09:08:44.000 23 23 566 566 2005-08-04 04:00:44.000 1 1 2020-12-23 07:17:59
11717 2005-08-17 07:44:09.000 1371 1371 566 566 2005-08-20 09:39:09.000 2 2 2020-12-23 07:18:08
11941 2005-08-17 16:56:57.000 159 159 566 566 2005-08-24 16:29:57.000 1 1 2020-12-23 07:18:10
12382 2005-08-18 08:32:33.000 3049 3049 566 566 2005-08-26 03:45:33.000 2 2 2020-12-23 07:18:16
12995 2005-08-19 07:26:30.000 2069 2069 566 566 2005-08-25 12:47:30.000 2 2 2020-12-23 07:18:25
13762 2005-08-20 11:29:32.000 451 451 566 566 2005-08-23 17:25:32.000 1 1 2020-12-23 07:18:37
14277 2005-08-21 06:34:41.000 2652 2652 566 566 2005-08-28 10:53:41.000 2 2 2020-12-23 07:18:45
14297 2005-08-21 07:13:46.000 1712 1712 566 566 2005-08-25 09:07:46.000 1 1 2020-12-23 07:18:45

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