home / sakila

rental

22 rows where customer_id = 476

✎ 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
489 2005-05-28 00:09:12.000 1940 1940 476 476 2005-05-31 04:44:12.000 2 2 2020-12-23 07:15:26
771 2005-05-29 12:59:14.000 353 353 476 476 2005-06-01 16:05:14.000 2 2 2020-12-23 07:15:30
1682 2005-06-16 11:54:25.000 2165 2165 476 476 2005-06-22 11:09:25.000 2 2 2020-12-23 07:15:42
2080 2005-06-17 16:59:40.000 1231 1231 476 476 2005-06-21 11:28:40.000 2 2 2020-12-23 07:15:48
2508 2005-06-18 23:43:58.000 4322 4322 476 476 2005-06-20 19:26:58.000 2 2 2020-12-23 07:15:54
3448 2005-06-21 20:59:20.000 592 592 476 476 2005-06-24 15:40:20.000 1 1 2020-12-23 07:16:07
3477 2005-07-05 23:05:17.000 4289 4289 476 476 2005-07-15 02:20:17.000 2 2 2020-12-23 07:16:07
4010 2005-07-07 00:47:00.000 4509 4509 476 476 2005-07-12 06:23:00.000 2 2 2020-12-23 07:16:16
4171 2005-07-07 09:49:04.000 4199 4199 476 476 2005-07-14 03:58:04.000 2 2 2020-12-23 07:16:18
5644 2005-07-10 06:57:44.000 4069 4069 476 476 2005-07-15 03:52:44.000 2 2 2020-12-23 07:16:40
6151 2005-07-11 09:25:17.000 352 352 476 476 2005-07-12 05:11:17.000 1 1 2020-12-23 07:16:47
7461 2005-07-27 18:45:15.000 1236 1236 476 476 2005-07-29 17:19:15.000 1 1 2020-12-23 07:17:07
8146 2005-07-28 20:37:36.000 2430 2430 476 476 2005-07-31 16:03:36.000 2 2 2020-12-23 07:17:17
9325 2005-07-30 17:29:19.000 1938 1938 476 476 2005-08-08 12:55:19.000 2 2 2020-12-23 07:17:34
9743 2005-07-31 09:12:42.000 1740 1740 476 476 2005-08-06 11:57:42.000 2 2 2020-12-23 07:17:40
10346 2005-08-01 05:19:23.000 4192 4192 476 476 2005-08-06 01:00:23.000 1 1 2020-12-23 07:17:48
10617 2005-08-01 15:05:52.000 4344 4344 476 476 2005-08-09 18:54:52.000 1 1 2020-12-23 07:17:52
10826 2005-08-01 23:07:56.000 1228 1228 476 476 2005-08-08 04:10:56.000 2 2 2020-12-23 07:17:55
12616 2005-08-18 17:22:41.000 2952 2952 476 476 2005-08-25 18:52:41.000 2 2 2020-12-23 07:18:19
12709 2005-08-18 20:59:51.000 3878 3878 476 476 2005-08-26 01:21:51.000 2 2 2020-12-23 07:18:21
13941 2006-02-14 15:16:03.000 2727 2727 476 476   2 2 2020-12-23 07:18:40
15413 2005-08-22 23:38:01.000 2494 2494 476 476 2005-08-23 19:27:01.000 2 2 2020-12-23 07:19:01

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