home / sakila

rental

16 rows where customer_id = 492

✎ 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
84 2005-05-25 12:36:30.000 1829 1829 492 492 2005-05-29 18:33:30.000 1 1 2020-12-23 07:15:21
1691 2005-06-16 12:24:28.000 4438 4438 492 492 2005-06-24 08:24:28.000 1 1 2020-12-23 07:15:42
1855 2005-06-17 00:54:58.000 4457 4457 492 492 2005-06-20 19:29:58.000 1 1 2020-12-23 07:15:45
1956 2005-06-17 08:43:32.000 1403 1403 492 492 2005-06-21 11:08:32.000 1 1 2020-12-23 07:15:46
3298 2005-06-21 07:09:44.000 444 444 492 492 2005-06-30 11:26:44.000 2 2 2020-12-23 07:16:05
4128 2005-07-07 07:35:25.000 3563 3563 492 492 2005-07-14 08:13:25.000 1 1 2020-12-23 07:16:17
4142 2005-07-07 08:19:45.000 4045 4045 492 492 2005-07-08 13:55:45.000 1 1 2020-12-23 07:16:18
4258 2005-07-07 14:20:59.000 1562 1562 492 492 2005-07-16 10:03:59.000 1 1 2020-12-23 07:16:19
5325 2005-07-09 16:35:47.000 2703 2703 492 492 2005-07-10 11:52:47.000 1 1 2020-12-23 07:16:35
5609 2005-07-10 05:09:46.000 1553 1553 492 492 2005-07-12 10:38:46.000 1 1 2020-12-23 07:16:39
6257 2005-07-11 15:23:46.000 3253 3253 492 492 2005-07-14 17:26:46.000 2 2 2020-12-23 07:16:48
7203 2005-07-27 09:01:23.000 1685 1685 492 492 2005-08-04 14:14:23.000 1 1 2020-12-23 07:17:03
12971 2005-08-19 06:42:43.000 3504 3504 492 492 2005-08-23 10:49:43.000 2 2 2020-12-23 07:18:25
14255 2005-08-21 05:51:37.000 3125 3125 492 492 2005-08-29 10:00:37.000 1 1 2020-12-23 07:18:44
15822 2005-08-23 15:05:59.000 3602 3602 492 492 2005-08-24 11:13:59.000 1 1 2020-12-23 07:19:07
15958 2005-08-23 19:22:36.000 4164 4164 492 492 2005-08-30 01:03:36.000 1 1 2020-12-23 07:19:09

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