home / sakila

rental

32 rows where customer_id = 1

✎ 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
76 2005-05-25 11:30:37.000 3021 3021 1 1 2005-06-03 12:00:37.000 2 2 2020-12-23 07:15:21
573 2005-05-28 10:35:23.000 4020 4020 1 1 2005-06-03 06:32:23.000 1 1 2020-12-23 07:15:27
1185 2005-06-15 00:54:12.000 2785 2785 1 1 2005-06-23 02:42:12.000 2 2 2020-12-23 07:15:35
1422 2005-06-15 18:02:53.000 1021 1021 1 1 2005-06-19 15:54:53.000 2 2 2020-12-23 07:15:39
1476 2005-06-15 21:08:46.000 1407 1407 1 1 2005-06-25 02:26:46.000 1 1 2020-12-23 07:15:39
1725 2005-06-16 15:18:57.000 726 726 1 1 2005-06-17 21:05:57.000 1 1 2020-12-23 07:15:43
2308 2005-06-18 08:41:48.000 197 197 1 1 2005-06-22 03:36:48.000 2 2 2020-12-23 07:15:51
2363 2005-06-18 13:33:59.000 3497 3497 1 1 2005-06-19 17:40:59.000 1 1 2020-12-23 07:15:52
3284 2005-06-21 06:24:45.000 4566 4566 1 1 2005-06-28 03:28:45.000 1 1 2020-12-23 07:16:05
4526 2005-07-08 03:17:05.000 1443 1443 1 1 2005-07-14 01:19:05.000 2 2 2020-12-23 07:16:23
4611 2005-07-08 07:33:56.000 3486 3486 1 1 2005-07-12 13:25:56.000 2 2 2020-12-23 07:16:25
5244 2005-07-09 13:24:07.000 3726 3726 1 1 2005-07-14 14:01:07.000 2 2 2020-12-23 07:16:34
5326 2005-07-09 16:38:01.000 797 797 1 1 2005-07-13 18:02:01.000 1 1 2020-12-23 07:16:35
6163 2005-07-11 10:13:46.000 1330 1330 1 1 2005-07-19 13:15:46.000 2 2 2020-12-23 07:16:47
7273 2005-07-27 11:31:22.000 2465 2465 1 1 2005-07-31 06:50:22.000 1 1 2020-12-23 07:17:04
7841 2005-07-28 09:04:45.000 1092 1092 1 1 2005-07-30 12:37:45.000 2 2 2020-12-23 07:17:12
8033 2005-07-28 16:18:23.000 4268 4268 1 1 2005-07-30 17:56:23.000 1 1 2020-12-23 07:17:15
8074 2005-07-28 17:33:39.000 1558 1558 1 1 2005-07-29 20:17:39.000 1 1 2020-12-23 07:17:15
8116 2005-07-28 19:20:07.000 4497 4497 1 1 2005-07-29 22:54:07.000 1 1 2020-12-23 07:17:16
8326 2005-07-29 03:58:49.000 108 108 1 1 2005-08-01 05:16:49.000 2 2 2020-12-23 07:17:19
9571 2005-07-31 02:42:18.000 2219 2219 1 1 2005-08-02 23:26:18.000 2 2 2020-12-23 07:17:37
10437 2005-08-01 08:51:04.000 14 14 1 1 2005-08-10 12:12:04.000 1 1 2020-12-23 07:17:50
11299 2005-08-02 15:36:52.000 3232 3232 1 1 2005-08-10 16:40:52.000 2 2 2020-12-23 07:18:02
11367 2005-08-02 18:01:38.000 1440 1440 1 1 2005-08-04 13:19:38.000 1 1 2020-12-23 07:18:03
11824 2005-08-17 12:37:54.000 2639 2639 1 1 2005-08-19 10:11:54.000 2 2 2020-12-23 07:18:09
12250 2005-08-18 03:57:29.000 921 921 1 1 2005-08-22 23:05:29.000 1 1 2020-12-23 07:18:15
13068 2005-08-19 09:55:16.000 3019 3019 1 1 2005-08-20 14:44:16.000 2 2 2020-12-23 07:18:26
13176 2005-08-19 13:56:54.000 2269 2269 1 1 2005-08-23 08:50:54.000 2 2 2020-12-23 07:18:28
14762 2005-08-21 23:33:57.000 4249 4249 1 1 2005-08-23 01:30:57.000 1 1 2020-12-23 07:18:51
14825 2005-08-22 01:27:57.000 1449 1449 1 1 2005-08-27 07:01:57.000 2 2 2020-12-23 07:18:52
15298 2005-08-22 19:41:37.000 1446 1446 1 1 2005-08-28 22:49:37.000 1 1 2020-12-23 07:18:59
15315 2005-08-22 20:03:46.000 312 312 1 1 2005-08-30 01:51:46.000 2 2 2020-12-23 07:18:59

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 19.769ms