home / sakila

rental

18 rows where customer_id = 353

✎ 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
1103 2005-05-31 14:24:18.000 3154 3154 353 353 2005-06-09 10:27:18.000 1 1 2020-12-23 07:15:34
1359 2005-06-15 13:30:30.000 3140 3140 353 353 2005-06-17 14:55:30.000 1 1 2020-12-23 07:15:38
1928 2005-06-17 06:48:31.000 3454 3454 353 353 2005-06-26 08:17:31.000 1 1 2020-12-23 07:15:46
3233 2005-06-21 02:39:31.000 3542 3542 353 353 2005-06-28 05:23:31.000 2 2 2020-12-23 07:16:04
4380 2005-07-07 20:35:00.000 3164 3164 353 353 2005-07-14 17:06:00.000 1 1 2020-12-23 07:16:21
6559 2005-07-12 05:20:35.000 458 458 353 353 2005-07-16 08:44:35.000 2 2 2020-12-23 07:16:53
6610 2005-07-12 08:20:02.000 645 645 353 353 2005-07-21 09:16:02.000 2 2 2020-12-23 07:16:54
7993 2005-07-28 14:56:41.000 2926 2926 353 353 2005-08-01 17:01:41.000 2 2 2020-12-23 07:17:14
10071 2005-07-31 19:49:35.000 2360 2360 353 353 2005-08-03 00:00:35.000 2 2 2020-12-23 07:17:45
11186 2005-08-02 11:12:08.000 733 733 353 353 2005-08-03 10:46:08.000 1 1 2020-12-23 07:18:00
11414 2005-08-02 19:43:07.000 1772 1772 353 353 2005-08-07 15:22:07.000 2 2 2020-12-23 07:18:03
11698 2005-08-17 07:09:59.000 3946 3946 353 353 2005-08-19 04:31:59.000 1 1 2020-12-23 07:18:07
12928 2005-08-19 05:04:09.000 4531 4531 353 353 2005-08-24 09:09:09.000 2 2 2020-12-23 07:18:24
13604 2005-08-20 06:03:33.000 4352 4352 353 353 2005-08-21 07:06:33.000 1 1 2020-12-23 07:18:34
14396 2005-08-21 10:24:54.000 3855 3855 353 353 2005-08-22 04:49:54.000 2 2 2020-12-23 07:18:46
15564 2005-08-23 05:10:42.000 1268 1268 353 353 2005-08-30 03:17:42.000 1 1 2020-12-23 07:19:03
15650 2005-08-23 08:29:53.000 2447 2447 353 353 2005-08-25 07:23:53.000 2 2 2020-12-23 07:19:04
15676 2005-08-23 09:23:08.000 3874 3874 353 353 2005-08-30 06:19:08.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.41ms