home / sakila

rental

30 rows where customer_id = 560

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: rental_date, 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
137 2005-05-25 22:25:18.000 2591 2591 560 560 2005-06-01 02:30:18.000 2 2 2020-12-23 07:15:22
1271 2005-06-15 07:32:24.000 379 379 560 560 2005-06-21 05:12:24.000 1 1 2020-12-23 07:15:37
1572 2005-06-16 03:23:22.000 4179 4179 560 560 2005-06-20 06:03:22.000 2 2 2020-12-23 07:15:40
3941 2005-07-06 21:20:37.000 382 382 560 560 2005-07-09 01:35:37.000 2 2 2020-12-23 07:16:15
4298 2005-07-07 16:27:25.000 1055 1055 560 560 2005-07-12 18:20:25.000 1 1 2020-12-23 07:16:20
4375 2005-07-07 20:20:29.000 3035 3035 560 560 2005-07-16 19:29:29.000 2 2 2020-12-23 07:16:21
4453 2005-07-07 23:32:39.000 89 89 560 560 2005-07-12 01:38:39.000 2 2 2020-12-23 07:16:22
5208 2005-07-09 11:16:56.000 1881 1881 560 560 2005-07-10 07:21:56.000 2 2 2020-12-23 07:16:34
6410 2005-07-11 23:08:06.000 1127 1127 560 560 2005-07-19 19:57:06.000 2 2 2020-12-23 07:16:51
6945 2005-07-26 23:35:29.000 1627 1627 560 560 2005-07-28 00:12:29.000 1 1 2020-12-23 07:16:59
7202 2005-07-27 09:00:20.000 109 109 560 560 2005-08-04 03:09:20.000 1 1 2020-12-23 07:17:03
7891 2005-07-28 10:43:56.000 3637 3637 560 560 2005-08-05 14:04:56.000 2 2 2020-12-23 07:17:13
8753 2005-07-29 19:15:50.000 1345 1345 560 560 2005-07-31 19:13:50.000 2 2 2020-12-23 07:17:26
8861 2005-07-29 23:47:29.000 759 759 560 560 2005-08-07 01:27:29.000 1 1 2020-12-23 07:17:27
8906 2005-07-30 01:21:39.000 2667 2667 560 560 2005-08-07 02:14:39.000 2 2 2020-12-23 07:17:28
9265 2005-07-30 14:55:25.000 3700 3700 560 560 2005-08-02 11:34:25.000 1 1 2020-12-23 07:17:33
9895 2005-07-31 14:07:56.000 835 835 560 560 2005-08-05 14:56:56.000 1 1 2020-12-23 07:17:42
10480 2005-08-01 10:13:41.000 553 553 560 560 2005-08-03 10:27:41.000 1 1 2020-12-23 07:17:50
10702 2005-08-01 18:34:59.000 2802 2802 560 560 2005-08-09 23:44:59.000 2 2 2020-12-23 07:17:54
10733 2005-08-01 19:28:01.000 3980 3980 560 560 2005-08-09 18:41:01.000 1 1 2020-12-23 07:17:54
11334 2005-08-02 16:53:20.000 1504 1504 560 560 2005-08-11 20:47:20.000 1 1 2020-12-23 07:18:02
11788 2005-08-17 10:59:18.000 1310 1310 560 560 2005-08-22 11:12:18.000 1 1 2020-12-23 07:18:08
12116 2006-02-14 15:16:03.000 3082 3082 560 560   2 2 2020-12-23 07:18:13
14008 2005-08-20 20:26:00.000 2427 2427 560 560 2005-08-28 17:23:00.000 2 2 2020-12-23 07:18:41
14341 2005-08-21 08:38:24.000 4498 4498 560 560 2005-08-26 12:36:24.000 1 1 2020-12-23 07:18:46
14363 2005-08-21 09:20:03.000 2579 2579 560 560 2005-08-23 14:26:03.000 1 1 2020-12-23 07:18:46
14425 2006-02-14 15:16:03.000 2752 2752 560 560   2 2 2020-12-23 07:18:47
14436 2005-08-21 11:48:27.000 3473 3473 560 560 2005-08-25 15:49:27.000 2 2 2020-12-23 07:18:47
14785 2005-08-22 00:24:37.000 1981 1981 560 560 2005-08-25 04:15:37.000 1 1 2020-12-23 07:18:52
15352 2005-08-22 21:16:54.000 16 16 560 560 2005-08-31 00:38:54.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.87ms