home / sakila

rental

26 rows where customer_id = 570

✎ 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
1060 2005-05-31 08:21:43.000 2676 2676 570 570 2005-06-09 04:02:43.000 2 2 2020-12-23 07:15:34
1259 2005-06-15 06:37:55.000 4460 4460 570 570 2005-06-23 04:02:55.000 2 2 2020-12-23 07:15:36
1417 2005-06-15 17:45:51.000 1334 1334 570 570 2005-06-19 14:00:51.000 2 2 2020-12-23 07:15:38
1804 2005-06-16 20:33:15.000 1152 1152 570 570 2005-06-18 02:31:15.000 2 2 2020-12-23 07:15:44
2008 2005-06-17 11:48:05.000 2081 2081 570 570 2005-06-25 13:16:05.000 1 1 2020-12-23 07:15:47
2031 2005-06-17 13:14:03.000 4275 4275 570 570 2005-06-25 10:06:03.000 2 2 2020-12-23 07:15:47
2261 2005-06-18 05:46:15.000 1763 1763 570 570 2005-06-24 05:06:15.000 1 1 2020-12-23 07:15:51
3138 2005-06-20 19:43:45.000 2265 2265 570 570 2005-06-26 20:41:45.000 1 1 2020-12-23 07:16:03
3984 2005-07-06 23:22:36.000 2205 2205 570 570 2005-07-08 21:40:36.000 2 2 2020-12-23 07:16:15
4069 2005-07-07 04:35:06.000 3361 3361 570 570 2005-07-10 23:59:06.000 2 2 2020-12-23 07:16:17
4698 2005-07-08 11:19:31.000 3963 3963 570 570 2005-07-13 13:45:31.000 2 2 2020-12-23 07:16:26
5638 2005-07-10 06:32:49.000 1528 1528 570 570 2005-07-13 04:32:49.000 2 2 2020-12-23 07:16:40
6253 2005-07-11 15:07:19.000 1425 1425 570 570 2005-07-13 11:00:19.000 1 1 2020-12-23 07:16:48
6556 2005-07-12 05:10:16.000 3901 3901 570 570 2005-07-13 04:16:16.000 2 2 2020-12-23 07:16:53
7174 2005-07-27 08:00:36.000 46 46 570 570 2005-08-01 03:11:36.000 1 1 2020-12-23 07:17:02
8735 2005-07-29 18:28:54.000 2881 2881 570 570 2005-08-03 12:43:54.000 2 2 2020-12-23 07:17:25
9385 2005-07-30 19:25:49.000 3453 3453 570 570 2005-08-08 17:08:49.000 2 2 2020-12-23 07:17:35
9398 2005-07-30 20:09:00.000 1175 1175 570 570 2005-08-01 23:35:00.000 2 2 2020-12-23 07:17:35
9432 2005-07-30 21:26:18.000 2489 2489 570 570 2005-08-05 00:23:18.000 1 1 2020-12-23 07:17:35
9766 2005-07-31 09:46:29.000 4049 4049 570 570 2005-08-01 05:08:29.000 1 1 2020-12-23 07:17:40
10004 2005-07-31 17:51:23.000 2396 2396 570 570 2005-08-03 19:12:23.000 1 1 2020-12-23 07:17:44
10168 2005-07-31 23:25:24.000 4548 4548 570 570 2005-08-02 19:03:24.000 1 1 2020-12-23 07:17:46
11098 2005-08-02 08:06:18.000 158 158 570 570 2005-08-11 04:50:18.000 2 2 2020-12-23 07:17:59
12042 2005-08-17 20:36:37.000 1772 1772 570 570 2005-08-21 15:03:37.000 1 1 2020-12-23 07:18:12
12716 2006-02-14 15:16:03.000 858 858 570 570   2 2 2020-12-23 07:18:21
14768 2005-08-21 23:44:53.000 3465 3465 570 570 2005-08-27 20:33:53.000 1 1 2020-12-23 07:18:51

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