home / sakila

rental

38 rows where customer_id = 5

✎ 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
731 2005-05-29 07:25:16.000 4124 4124 5 5 2005-05-30 05:21:16.000 1 1 2020-12-23 07:15:29
1085 2005-05-31 11:15:43.000 301 301 5 5 2005-06-07 12:02:43.000 1 1 2020-12-23 07:15:34
1142 2005-05-31 19:46:38.000 3998 3998 5 5 2005-06-05 14:03:38.000 1 1 2020-12-23 07:15:35
1502 2005-06-15 22:03:14.000 3277 3277 5 5 2005-06-23 18:42:14.000 2 2 2020-12-23 07:15:40
1631 2005-06-16 08:01:02.000 2466 2466 5 5 2005-06-19 09:04:02.000 1 1 2020-12-23 07:15:41
2063 2005-06-17 15:56:53.000 4323 4323 5 5 2005-06-21 14:19:53.000 1 1 2020-12-23 07:15:48
2570 2005-06-19 04:20:13.000 1105 1105 5 5 2005-06-25 07:00:13.000 1 1 2020-12-23 07:15:55
3126 2005-06-20 18:38:22.000 1183 1183 5 5 2005-06-26 00:00:22.000 1 1 2020-12-23 07:16:02
3677 2005-07-06 09:11:58.000 600 600 5 5 2005-07-08 10:50:58.000 2 2 2020-12-23 07:16:11
4889 2005-07-08 20:04:43.000 4463 4463 5 5 2005-07-13 17:57:43.000 2 2 2020-12-23 07:16:29
5016 2005-07-09 01:57:57.000 1871 1871 5 5 2005-07-09 22:07:57.000 1 1 2020-12-23 07:16:31
5118 2005-07-09 07:13:52.000 957 957 5 5 2005-07-18 05:18:52.000 2 2 2020-12-23 07:16:32
5156 2005-07-09 08:51:42.000 416 416 5 5 2005-07-15 03:59:42.000 2 2 2020-12-23 07:16:33
5721 2005-07-10 11:09:35.000 2348 2348 5 5 2005-07-17 16:41:35.000 2 2 2020-12-23 07:16:41
6042 2005-07-11 03:17:04.000 2153 2153 5 5 2005-07-19 07:08:04.000 1 1 2020-12-23 07:16:46
6663 2005-07-12 11:27:35.000 4364 4364 5 5 2005-07-21 16:35:35.000 1 1 2020-12-23 07:16:55
6685 2005-07-12 12:16:28.000 1434 1434 5 5 2005-07-19 17:03:28.000 1 1 2020-12-23 07:16:55
7293 2005-07-27 12:37:28.000 3333 3333 5 5 2005-07-30 15:12:28.000 2 2 2020-12-23 07:17:04
7652 2005-07-28 01:50:29.000 92 92 5 5 2005-07-30 22:23:29.000 2 2 2020-12-23 07:17:09
7829 2005-07-28 08:43:39.000 111 111 5 5 2005-08-04 14:33:39.000 1 1 2020-12-23 07:17:12
8263 2005-07-29 01:11:23.000 28 28 5 5 2005-07-31 01:53:23.000 2 2 2020-12-23 07:17:18
8978 2005-07-30 04:14:28.000 711 711 5 5 2005-08-06 09:08:28.000 1 1 2020-12-23 07:17:29
9493 2005-07-30 23:52:30.000 1522 1522 5 5 2005-08-08 05:22:30.000 1 1 2020-12-23 07:17:36
9888 2005-07-31 14:00:53.000 4400 4400 5 5 2005-08-08 18:51:53.000 2 2 2020-12-23 07:17:42
10609 2005-08-01 14:48:45.000 2587 2587 5 5 2005-08-04 13:41:45.000 2 2 2020-12-23 07:17:52
10625 2005-08-01 15:27:10.000 3022 3022 5 5 2005-08-02 13:16:10.000 1 1 2020-12-23 07:17:53
11001 2005-08-02 04:56:45.000 3701 3701 5 5 2005-08-11 08:04:45.000 1 1 2020-12-23 07:17:58
11179 2005-08-02 10:50:06.000 4376 4376 5 5 2005-08-04 05:24:06.000 1 1 2020-12-23 07:18:00
11930 2005-08-17 16:28:53.000 1299 1299 5 5 2005-08-25 10:31:53.000 1 1 2020-12-23 07:18:10
12145 2005-08-18 00:10:04.000 3482 3482 5 5 2005-08-26 00:51:04.000 1 1 2020-12-23 07:18:13
12797 2005-08-19 00:24:08.000 1595 1595 5 5 2005-08-21 22:53:08.000 2 2 2020-12-23 07:18:22
13063 2005-08-19 09:45:41.000 1192 1192 5 5 2005-08-24 09:11:41.000 2 2 2020-12-23 07:18:26
13209 2006-02-14 15:16:03.000 1574 1574 5 5   2 2 2020-12-23 07:18:28
13877 2005-08-20 15:16:18.000 3387 3387 5 5 2005-08-22 18:20:18.000 1 1 2020-12-23 07:18:39
14053 2005-08-20 22:13:59.000 2177 2177 5 5 2005-08-26 20:50:59.000 2 2 2020-12-23 07:18:41
14430 2005-08-21 11:31:11.000 2623 2623 5 5 2005-08-26 06:29:11.000 1 1 2020-12-23 07:18:47
14494 2005-08-21 14:02:50.000 169 169 5 5 2005-08-22 16:45:50.000 2 2 2020-12-23 07:18:48
15232 2005-08-22 17:37:02.000 61 61 5 5 2005-08-25 18:45:02.000 1 1 2020-12-23 07:18:58

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