home / sakila

rental

21 rows where customer_id = 118

✎ 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
351 2005-05-27 05:39:03.000 3371 3371 118 118 2005-06-01 11:10:03.000 1 1 2020-12-23 07:15:24
1766 2005-06-16 17:59:37.000 2041 2041 118 118 2005-06-18 16:32:37.000 2 2 2020-12-23 07:15:43
2217 2005-06-18 03:12:29.000 2260 2260 118 118 2005-06-20 06:08:29.000 1 1 2020-12-23 07:15:50
3263 2005-06-21 04:15:52.000 3491 3491 118 118 2005-06-24 02:19:52.000 2 2 2020-12-23 07:16:04
4966 2005-07-08 23:47:25.000 4360 4360 118 118 2005-07-14 03:35:25.000 1 1 2020-12-23 07:16:30
5829 2005-07-10 16:29:41.000 3405 3405 118 118 2005-07-14 22:03:41.000 1 1 2020-12-23 07:16:43
6377 2005-07-11 21:41:16.000 4017 4017 118 118 2005-07-15 20:05:16.000 1 1 2020-12-23 07:16:50
6507 2005-07-12 03:33:12.000 2463 2463 118 118 2005-07-20 03:56:12.000 1 1 2020-12-23 07:16:52
7196 2005-07-27 08:49:08.000 2998 2998 118 118 2005-07-29 03:54:08.000 1 1 2020-12-23 07:17:03
7850 2005-07-28 09:31:13.000 2913 2913 118 118 2005-08-02 14:06:13.000 2 2 2020-12-23 07:17:12
7956 2005-07-28 13:32:17.000 4335 4335 118 118 2005-08-06 14:51:17.000 2 2 2020-12-23 07:17:14
8314 2005-07-29 03:35:04.000 2182 2182 118 118 2005-08-06 08:43:04.000 2 2 2020-12-23 07:17:19
8760 2005-07-29 19:22:40.000 3566 3566 118 118 2005-08-05 01:09:40.000 2 2 2020-12-23 07:17:26
8881 2005-07-30 00:22:31.000 2012 2012 118 118 2005-08-04 19:10:31.000 1 1 2020-12-23 07:17:27
10045 2005-07-31 19:04:35.000 58 58 118 118 2005-08-07 16:53:35.000 1 1 2020-12-23 07:17:44
12538 2005-08-18 14:09:09.000 1373 1373 118 118 2005-08-23 19:12:09.000 1 1 2020-12-23 07:18:18
13193 2005-08-19 14:33:45.000 523 523 118 118 2005-08-28 08:46:45.000 2 2 2020-12-23 07:18:28
14394 2005-08-21 10:23:10.000 4555 4555 118 118 2005-08-28 09:33:10.000 1 1 2020-12-23 07:18:46
14595 2005-08-21 17:35:17.000 1879 1879 118 118 2005-08-27 12:11:17.000 1 1 2020-12-23 07:18:49
14924 2005-08-22 05:15:17.000 4189 4189 118 118 2005-08-23 10:11:17.000 1 1 2020-12-23 07:18:53
15731 2005-08-23 11:33:25.000 3403 3403 118 118 2005-08-24 07:19:25.000 2 2 2020-12-23 07:19:05

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