home / sakila

rental

20 rows where customer_id = 567

✎ 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
2689 2005-06-19 12:58:53.000 2478 2478 567 567 2005-06-24 17:35:53.000 1 1 2020-12-23 07:15:57
3010 2005-06-20 10:29:59.000 1298 1298 567 567 2005-06-27 06:52:59.000 1 1 2020-12-23 07:16:01
3769 2005-07-06 13:11:33.000 467 467 567 567 2005-07-14 17:54:33.000 2 2 2020-12-23 07:16:12
4457 2005-07-07 23:45:38.000 407 407 567 567 2005-07-09 20:02:38.000 1 1 2020-12-23 07:16:22
4576 2005-07-08 05:51:19.000 1920 1920 567 567 2005-07-10 11:36:19.000 1 1 2020-12-23 07:16:24
4949 2005-07-08 22:57:10.000 1184 1184 567 567 2005-07-11 01:26:10.000 2 2 2020-12-23 07:16:30
6358 2005-07-11 21:03:12.000 4527 4527 567 567 2005-07-15 20:06:12.000 2 2 2020-12-23 07:16:50
6551 2005-07-12 05:03:43.000 282 282 567 567 2005-07-13 10:44:43.000 1 1 2020-12-23 07:16:53
7340 2005-07-27 14:18:10.000 1344 1344 567 567 2005-07-30 09:57:10.000 1 1 2020-12-23 07:17:05
8201 2005-07-28 23:10:48.000 220 220 567 567 2005-08-01 00:50:48.000 2 2 2020-12-23 07:17:17
8629 2005-07-29 14:06:35.000 853 853 567 567 2005-08-03 16:59:35.000 2 2 2020-12-23 07:17:24
9279 2005-07-30 15:15:21.000 1070 1070 567 567 2005-08-07 18:46:21.000 1 1 2020-12-23 07:17:33
9475 2005-07-30 23:06:33.000 2186 2186 567 567 2005-08-04 23:23:33.000 1 1 2020-12-23 07:17:36
10708 2005-08-01 18:43:28.000 3978 3978 567 567 2005-08-09 15:24:28.000 1 1 2020-12-23 07:17:54
11749 2005-08-17 09:04:03.000 4141 4141 567 567 2005-08-19 09:32:03.000 2 2 2020-12-23 07:18:08
12119 2005-08-17 23:16:44.000 4298 4298 567 567 2005-08-20 02:13:44.000 2 2 2020-12-23 07:18:13
13031 2005-08-19 08:30:04.000 1525 1525 567 567 2005-08-23 09:35:04.000 2 2 2020-12-23 07:18:26
14839 2005-08-22 01:58:15.000 3440 3440 567 567 2005-08-24 05:24:15.000 2 2 2020-12-23 07:18:52
15074 2005-08-22 11:02:52.000 3112 3112 567 567 2005-08-28 07:59:52.000 2 2 2020-12-23 07:18:56
15594 2005-08-23 06:18:43.000 4227 4227 567 567 2005-09-01 09:09:43.000 2 2 2020-12-23 07:19:03

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