home / sakila

rental

25 rows where customer_id = 528

✎ 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
204 2005-05-26 07:30:37.000 1842 1842 528 528 2005-05-30 08:11:37.000 1 1 2020-12-23 07:15:22
472 2005-05-27 21:36:15.000 1338 1338 528 528 2005-05-29 21:07:15.000 1 1 2020-12-23 07:15:26
533 2005-05-28 06:14:46.000 4306 4306 528 528 2005-06-01 06:26:46.000 2 2 2020-12-23 07:15:27
695 2005-05-29 01:50:53.000 4276 4276 528 528 2005-06-03 02:28:53.000 1 1 2020-12-23 07:15:29
793 2005-05-29 16:44:08.000 379 379 528 528 2005-06-06 19:21:08.000 2 2 2020-12-23 07:15:30
1875 2005-06-17 02:45:10.000 1652 1652 528 528 2005-06-22 22:54:10.000 2 2 2020-12-23 07:15:45
2019 2005-06-17 12:38:44.000 2314 2314 528 528 2005-06-23 17:38:44.000 2 2 2020-12-23 07:15:47
3654 2005-07-06 07:45:31.000 1621 1621 528 528 2005-07-12 09:59:31.000 2 2 2020-12-23 07:16:10
3664 2005-07-06 08:15:57.000 3366 3366 528 528 2005-07-08 06:11:57.000 1 1 2020-12-23 07:16:10
4050 2005-07-07 03:35:33.000 104 104 528 528 2005-07-15 03:11:33.000 1 1 2020-12-23 07:16:16
4593 2005-07-08 06:38:12.000 2897 2897 528 528 2005-07-16 10:48:12.000 2 2 2020-12-23 07:16:24
5215 2005-07-09 11:47:58.000 3888 3888 528 528 2005-07-18 09:58:58.000 1 1 2020-12-23 07:16:34
6561 2005-07-12 05:24:02.000 4568 4568 528 528 2005-07-16 03:43:02.000 2 2 2020-12-23 07:16:53
7569 2005-07-27 22:38:53.000 2315 2315 528 528 2005-08-05 19:03:53.000 2 2 2020-12-23 07:17:08
8112 2005-07-28 19:11:07.000 2444 2444 528 528 2005-08-03 18:41:07.000 1 1 2020-12-23 07:17:16
8727 2005-07-29 18:09:57.000 3031 3031 528 528 2005-08-03 13:41:57.000 2 2 2020-12-23 07:17:25
9488 2005-07-30 23:42:42.000 4221 4221 528 528 2005-08-08 22:15:42.000 1 1 2020-12-23 07:17:36
10084 2005-07-31 20:11:29.000 524 524 528 528 2005-08-06 22:28:29.000 2 2 2020-12-23 07:17:45
10673 2005-08-01 17:11:51.000 2735 2735 528 528 2005-08-03 13:32:51.000 1 1 2020-12-23 07:17:53
10880 2005-08-02 00:34:12.000 450 450 528 528 2005-08-06 21:15:12.000 2 2 2020-12-23 07:17:56
12818 2005-08-19 01:04:59.000 3069 3069 528 528 2005-08-26 21:39:59.000 2 2 2020-12-23 07:18:22
13518 2005-08-20 02:36:17.000 352 352 528 528 2005-08-24 08:06:17.000 1 1 2020-12-23 07:18:33
13600 2005-08-20 06:00:25.000 431 431 528 528 2005-08-28 02:39:25.000 1 1 2020-12-23 07:18:34
14148 2005-08-21 02:17:49.000 1605 1605 528 528 2005-08-22 00:12:49.000 1 1 2020-12-23 07:18:43
15880 2005-08-23 16:43:54.000 2538 2538 528 528 2005-08-31 14:40:54.000 2 2 2020-12-23 07:19:08

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