home / sakila

rental

32 rows where customer_id = 28

✎ 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
388 2005-05-27 10:37:27.000 434 434 28 28 2005-05-30 05:45:27.000 1 1 2020-12-23 07:15:25
868 2005-05-30 04:19:55.000 3604 3604 28 28 2005-05-31 02:28:55.000 1 1 2020-12-23 07:15:31
1240 2005-06-15 04:58:07.000 3841 3841 28 28 2005-06-17 23:56:07.000 1 1 2020-12-23 07:15:36
1543 2005-06-16 01:24:08.000 1188 1188 28 28 2005-06-18 06:24:08.000 2 2 2020-12-23 07:15:40
2299 2005-06-18 08:18:52.000 4339 4339 28 28 2005-06-26 11:48:52.000 1 1 2020-12-23 07:15:51
2604 2005-06-19 06:30:10.000 2889 2889 28 28 2005-06-25 11:16:10.000 2 2 2020-12-23 07:15:55
3231 2005-06-21 02:25:00.000 237 237 28 28 2005-06-23 05:46:00.000 2 2 2020-12-23 07:16:04
3845 2005-07-06 16:38:14.000 4495 4495 28 28 2005-07-09 14:59:14.000 2 2 2020-12-23 07:16:13
4704 2005-07-08 11:45:35.000 2291 2291 28 28 2005-07-10 09:46:35.000 1 1 2020-12-23 07:16:26
4951 2005-07-08 22:58:21.000 2766 2766 28 28 2005-07-16 18:58:21.000 1 1 2020-12-23 07:16:30
5653 2005-07-10 07:21:27.000 919 919 28 28 2005-07-16 01:58:27.000 1 1 2020-12-23 07:16:40
5817 2005-07-10 15:49:12.000 2993 2993 28 28 2005-07-18 19:30:12.000 2 2 2020-12-23 07:16:43
6032 2005-07-11 02:49:01.000 3792 3792 28 28 2005-07-18 05:05:01.000 2 2 2020-12-23 07:16:46
6476 2005-07-12 01:37:48.000 978 978 28 28 2005-07-12 20:21:48.000 2 2 2020-12-23 07:16:52
7580 2005-07-27 23:07:40.000 338 338 28 28 2005-08-05 02:17:40.000 1 1 2020-12-23 07:17:08
8464 2005-07-29 08:18:20.000 2343 2343 28 28 2005-08-03 04:50:20.000 2 2 2020-12-23 07:17:21
8901 2005-07-30 01:07:12.000 4392 4392 28 28 2005-08-02 06:34:12.000 1 1 2020-12-23 07:17:28
9544 2005-07-31 01:44:51.000 2383 2383 28 28 2005-08-05 05:25:51.000 2 2 2020-12-23 07:17:37
9593 2005-07-31 03:22:30.000 1223 1223 28 28 2005-08-05 08:23:30.000 1 1 2020-12-23 07:17:38
9705 2005-07-31 07:40:33.000 4158 4158 28 28 2005-08-01 03:50:33.000 2 2 2020-12-23 07:17:39
10116 2005-07-31 21:14:02.000 738 738 28 28 2005-08-03 01:48:02.000 2 2 2020-12-23 07:17:45
10294 2005-08-01 03:48:12.000 528 528 28 28 2005-08-09 01:19:12.000 2 2 2020-12-23 07:17:48
11444 2005-08-02 20:32:55.000 1419 1419 28 28 2005-08-08 23:21:55.000 2 2 2020-12-23 07:18:04
11856 2005-08-17 13:44:49.000 305 305 28 28 2005-08-21 17:20:49.000 1 1 2020-12-23 07:18:09
12190 2005-08-18 01:54:44.000 2464 2464 28 28 2005-08-27 04:32:44.000 1 1 2020-12-23 07:18:14
12359 2005-08-18 07:44:05.000 4172 4172 28 28 2005-08-19 02:26:05.000 1 1 2020-12-23 07:18:16
12708 2005-08-18 20:59:17.000 3448 3448 28 28 2005-08-24 22:40:17.000 1 1 2020-12-23 07:18:21
12938 2006-02-14 15:16:03.000 3987 3987 28 28   1 1 2020-12-23 07:18:24
13783 2005-08-20 12:11:03.000 2643 2643 28 28 2005-08-21 15:53:03.000 2 2 2020-12-23 07:18:37
14540 2005-08-21 15:34:23.000 2362 2362 28 28 2005-08-27 11:51:23.000 2 2 2020-12-23 07:18:48
15445 2005-08-23 00:48:29.000 196 196 28 28 2005-08-28 00:33:29.000 1 1 2020-12-23 07:19:01
15491 2005-08-23 02:08:40.000 2059 2059 28 28 2005-08-23 20:23:40.000 2 2 2020-12-23 07:19:02

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