home / sakila

rental

32 rows where customer_id = 470

✎ 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
60 2005-05-25 08:58:25.000 330 330 470 470 2005-05-30 14:14:25.000 1 1 2020-12-23 07:15:21
1256 2005-06-15 06:13:57.000 1437 1437 470 470 2005-06-16 06:54:57.000 2 2 2020-12-23 07:15:36
1283 2005-06-15 08:27:30.000 3177 3177 470 470 2005-06-16 09:46:30.000 2 2 2020-12-23 07:15:37
1594 2005-06-16 05:15:12.000 3858 3858 470 470 2005-06-25 00:38:12.000 1 1 2020-12-23 07:15:41
3764 2005-07-06 13:01:03.000 3115 3115 470 470 2005-07-13 15:26:03.000 1 1 2020-12-23 07:16:12
3841 2005-07-06 16:34:00.000 4228 4228 470 470 2005-07-08 15:12:00.000 2 2 2020-12-23 07:16:13
3922 2005-07-06 20:32:27.000 2878 2878 470 470 2005-07-14 19:00:27.000 1 1 2020-12-23 07:16:14
4373 2005-07-07 20:10:59.000 3593 3593 470 470 2005-07-12 21:30:59.000 2 2 2020-12-23 07:16:21
4502 2005-07-08 02:12:04.000 225 225 470 470 2005-07-15 02:19:04.000 2 2 2020-12-23 07:16:23
5082 2005-07-09 05:28:38.000 1584 1584 470 470 2005-07-10 02:46:38.000 2 2 2020-12-23 07:16:32
6009 2005-07-11 01:51:58.000 494 494 470 470 2005-07-18 07:12:58.000 2 2 2020-12-23 07:16:45
6198 2005-07-11 12:12:17.000 3345 3345 470 470 2005-07-18 07:40:17.000 2 2 2020-12-23 07:16:48
6703 2005-07-12 12:50:19.000 46 46 470 470 2005-07-16 13:41:19.000 1 1 2020-12-23 07:16:55
6927 2005-07-26 22:56:00.000 4511 4511 470 470 2005-08-05 03:16:00.000 2 2 2020-12-23 07:16:59
6942 2005-07-26 23:27:40.000 1203 1203 470 470 2005-07-31 03:17:40.000 2 2 2020-12-23 07:16:59
7663 2005-07-28 02:19:48.000 832 832 470 470 2005-07-30 21:43:48.000 2 2 2020-12-23 07:17:10
8476 2005-07-29 08:39:12.000 3741 3741 470 470 2005-08-06 03:03:12.000 1 1 2020-12-23 07:17:22
8890 2005-07-30 00:42:06.000 3656 3656 470 470 2005-08-05 21:04:06.000 1 1 2020-12-23 07:17:28
9422 2005-07-30 21:08:41.000 1843 1843 470 470 2005-08-07 15:55:41.000 1 1 2020-12-23 07:17:35
9687 2005-07-31 06:52:54.000 3540 3540 470 470 2005-08-01 03:40:54.000 2 2 2020-12-23 07:17:39
10006 2005-07-31 17:54:35.000 2538 2538 470 470 2005-08-02 20:40:35.000 2 2 2020-12-23 07:17:44
10236 2005-08-01 02:05:34.000 3754 3754 470 470 2005-08-01 23:40:34.000 1 1 2020-12-23 07:17:47
10944 2005-08-02 03:20:03.000 2373 2373 470 470 2005-08-04 04:13:03.000 2 2 2020-12-23 07:17:57
11397 2005-08-02 18:53:14.000 2566 2566 470 470 2005-08-09 18:09:14.000 1 1 2020-12-23 07:18:03
11711 2005-08-17 07:30:55.000 1503 1503 470 470 2005-08-18 09:21:55.000 1 1 2020-12-23 07:18:07
11742 2005-08-17 08:48:43.000 596 596 470 470 2005-08-23 07:18:43.000 2 2 2020-12-23 07:18:08
12177 2005-08-18 01:15:47.000 522 522 470 470 2005-08-24 23:23:47.000 2 2 2020-12-23 07:18:14
12423 2005-08-18 10:14:52.000 1014 1014 470 470 2005-08-26 13:16:52.000 2 2 2020-12-23 07:18:17
12753 2005-08-18 22:37:39.000 1494 1494 470 470 2005-08-27 00:21:39.000 2 2 2020-12-23 07:18:21
13585 2005-08-20 05:32:23.000 3314 3314 470 470 2005-08-27 23:36:23.000 1 1 2020-12-23 07:18:34
13592 2005-08-20 05:50:35.000 1509 1509 470 470 2005-08-23 04:52:35.000 1 1 2020-12-23 07:18:34
14405 2005-08-21 10:45:01.000 2777 2777 470 470 2005-08-30 04:48:01.000 2 2 2020-12-23 07:18:46

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