home / sakila

rental

26 rows where customer_id = 487

✎ 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
3100 2005-06-20 16:47:57.000 2428 2428 487 487 2005-06-26 16:59:57.000 1 1 2020-12-23 07:16:02
3994 2005-07-06 23:39:01.000 902 902 487 487 2005-07-14 00:33:01.000 1 1 2020-12-23 07:16:15
4854 2005-07-08 18:44:44.000 3644 3644 487 487 2005-07-13 13:37:44.000 1 1 2020-12-23 07:16:28
5634 2005-07-10 06:25:48.000 323 323 487 487 2005-07-17 09:07:48.000 2 2 2020-12-23 07:16:40
6928 2005-07-26 22:56:21.000 3605 3605 487 487 2005-07-30 04:46:21.000 1 1 2020-12-23 07:16:59
7097 2005-07-27 04:56:09.000 258 258 487 487 2005-07-31 05:47:09.000 1 1 2020-12-23 07:17:01
7788 2005-07-28 07:21:55.000 95 95 487 487 2005-08-03 06:33:55.000 1 1 2020-12-23 07:17:11
7949 2005-07-28 13:07:24.000 2145 2145 487 487 2005-08-02 09:41:24.000 1 1 2020-12-23 07:17:14
8510 2005-07-29 09:41:38.000 7 7 487 487 2005-08-05 05:30:38.000 2 2 2020-12-23 07:17:22
8689 2005-07-29 16:38:58.000 824 824 487 487 2005-08-01 17:09:58.000 2 2 2020-12-23 07:17:25
8814 2005-07-29 21:49:43.000 1492 1492 487 487 2005-08-01 19:56:43.000 1 1 2020-12-23 07:17:26
8988 2005-07-30 04:38:49.000 777 777 487 487 2005-08-07 07:00:49.000 2 2 2020-12-23 07:17:29
9457 2005-07-30 22:23:05.000 2172 2172 487 487 2005-07-31 23:07:05.000 2 2 2020-12-23 07:17:36
9490 2005-07-30 23:45:09.000 1302 1302 487 487 2005-08-07 18:50:09.000 1 1 2020-12-23 07:17:36
10123 2005-07-31 21:30:46.000 4564 4564 487 487 2005-08-06 16:28:46.000 1 1 2020-12-23 07:17:45
10511 2005-08-01 11:32:16.000 3874 3874 487 487 2005-08-04 09:38:16.000 1 1 2020-12-23 07:17:51
10555 2005-08-01 12:56:38.000 377 377 487 487 2005-08-10 18:19:38.000 1 1 2020-12-23 07:17:52
10832 2005-08-01 23:24:53.000 4096 4096 487 487 2005-08-06 23:18:53.000 1 1 2020-12-23 07:17:55
10877 2005-08-02 00:32:04.000 3337 3337 487 487 2005-08-07 19:44:04.000 2 2 2020-12-23 07:17:56
10978 2005-08-02 04:12:27.000 1597 1597 487 487 2005-08-10 08:19:27.000 2 2 2020-12-23 07:17:57
11669 2005-08-17 05:48:51.000 3224 3224 487 487 2005-08-22 01:22:51.000 1 1 2020-12-23 07:18:07
11890 2005-08-17 15:08:43.000 3023 3023 487 487 2005-08-26 14:56:43.000 2 2 2020-12-23 07:18:10
12493 2005-08-18 12:53:38.000 3029 3029 487 487 2005-08-27 13:15:38.000 2 2 2020-12-23 07:18:18
13210 2005-08-19 15:23:38.000 2789 2789 487 487 2005-08-21 11:57:38.000 1 1 2020-12-23 07:18:28
13658 2005-08-20 08:02:22.000 3827 3827 487 487 2005-08-28 06:00:22.000 1 1 2020-12-23 07:18:35
15665 2005-08-23 08:59:12.000 3471 3471 487 487 2005-08-24 12:50:12.000 2 2 2020-12-23 07:19:04

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