home / sakila

rental

29 rows where customer_id = 52

✎ 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
874 2005-05-30 05:36:21.000 363 363 52 52 2005-06-01 09:32:21.000 1 1 2020-12-23 07:15:31
1196 2005-06-15 01:38:31.000 994 994 52 52 2005-06-18 06:55:31.000 1 1 2020-12-23 07:15:36
2232 2005-06-18 03:54:31.000 2463 2463 52 52 2005-06-22 07:29:31.000 1 1 2020-12-23 07:15:50
2862 2005-06-19 23:47:24.000 4260 4260 52 52 2005-06-23 03:39:24.000 2 2 2020-12-23 07:15:59
3196 2005-06-21 00:02:28.000 1575 1575 52 52 2005-06-22 23:08:28.000 1 1 2020-12-23 07:16:03
3997 2005-07-06 23:46:52.000 3895 3895 52 52 2005-07-14 05:39:52.000 2 2 2020-12-23 07:16:15
5308 2005-07-09 15:58:38.000 1684 1684 52 52 2005-07-15 13:55:38.000 2 2 2020-12-23 07:16:35
5313 2005-07-09 16:04:45.000 1885 1885 52 52 2005-07-17 18:53:45.000 2 2 2020-12-23 07:16:35
5607 2005-07-10 05:08:10.000 4257 4257 52 52 2005-07-15 00:40:10.000 2 2 2020-12-23 07:16:39
6394 2005-07-11 22:29:15.000 2574 2574 52 52 2005-07-20 02:19:15.000 2 2 2020-12-23 07:16:51
7284 2005-07-27 12:12:04.000 2336 2336 52 52 2005-07-31 11:17:04.000 2 2 2020-12-23 07:17:04
7438 2005-07-27 17:40:40.000 1364 1364 52 52 2005-08-05 15:25:40.000 1 1 2020-12-23 07:17:06
7627 2005-07-28 00:56:47.000 782 782 52 52 2005-08-02 04:16:47.000 1 1 2020-12-23 07:17:09
8686 2005-07-29 16:17:49.000 4160 4160 52 52 2005-08-01 12:50:49.000 2 2 2020-12-23 07:17:25
9029 2005-07-30 06:03:11.000 2220 2220 52 52 2005-08-04 01:42:11.000 1 1 2020-12-23 07:17:30
9749 2005-07-31 09:18:33.000 658 658 52 52 2005-08-06 07:41:33.000 1 1 2020-12-23 07:17:40
9797 2005-07-31 10:53:44.000 687 687 52 52 2005-08-09 05:51:44.000 1 1 2020-12-23 07:17:41
10591 2005-08-01 14:12:29.000 3360 3360 52 52 2005-08-04 08:46:29.000 2 2 2020-12-23 07:17:52
10635 2005-08-01 15:37:58.000 547 547 52 52 2005-08-07 11:15:58.000 2 2 2020-12-23 07:17:53
11068 2005-08-02 07:08:07.000 1262 1262 52 52 2005-08-09 11:15:07.000 2 2 2020-12-23 07:17:58
11731 2005-08-17 08:24:35.000 917 917 52 52 2005-08-24 02:54:35.000 2 2 2020-12-23 07:18:08
12001 2006-02-14 15:16:03.000 4158 4158 52 52   2 2 2020-12-23 07:18:11
12200 2005-08-18 02:12:33.000 840 840 52 52 2005-08-18 20:47:33.000 2 2 2020-12-23 07:18:14
12520 2005-08-18 13:42:45.000 681 681 52 52 2005-08-23 12:54:45.000 2 2 2020-12-23 07:18:18
13090 2005-08-19 10:39:54.000 1447 1447 52 52 2005-08-28 10:31:54.000 1 1 2020-12-23 07:18:26
14820 2005-08-22 01:18:37.000 1409 1409 52 52 2005-08-23 19:44:37.000 1 1 2020-12-23 07:18:52
14822 2005-08-22 01:21:14.000 2835 2835 52 52 2005-08-30 03:59:14.000 1 1 2020-12-23 07:18:52
14961 2005-08-22 06:35:50.000 3274 3274 52 52 2005-08-31 04:07:50.000 2 2 2020-12-23 07:18:54
15891 2005-08-23 17:00:12.000 2168 2168 52 52 2005-08-31 21:12:12.000 1 1 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 12.569ms