home / sakila

rental

19 rows where customer_id = 599

✎ 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
1008 2005-05-31 01:18:56.000 914 914 599 599 2005-06-01 01:24:56.000 2 2 2020-12-23 07:15:33
2272 2005-06-18 06:29:53.000 1364 1364 599 599 2005-06-23 10:58:53.000 1 1 2020-12-23 07:15:51
3043 2005-06-20 12:38:35.000 633 633 599 599 2005-06-29 14:16:35.000 2 2 2020-12-23 07:16:01
3398 2005-06-21 15:34:38.000 221 221 599 599 2005-06-29 11:23:38.000 1 1 2020-12-23 07:16:06
3429 2005-06-21 18:46:05.000 456 456 599 599 2005-06-30 17:28:05.000 1 1 2020-12-23 07:16:07
5065 2005-07-09 04:42:00.000 1788 1788 599 599 2005-07-12 08:55:00.000 1 1 2020-12-23 07:16:32
5843 2005-07-10 17:14:27.000 1615 1615 599 599 2005-07-15 21:18:27.000 2 2 2020-12-23 07:16:43
6800 2005-07-12 17:03:56.000 3742 3742 599 599 2005-07-21 20:32:56.000 2 2 2020-12-23 07:16:57
6895 2005-07-12 21:23:59.000 2935 2935 599 599 2005-07-19 20:47:59.000 2 2 2020-12-23 07:16:58
8965 2005-07-30 03:52:37.000 2419 2419 599 599 2005-08-05 01:28:37.000 2 2 2020-12-23 07:17:29
9630 2005-07-31 04:57:07.000 2008 2008 599 599 2005-08-07 10:55:07.000 2 2 2020-12-23 07:17:38
9679 2005-07-31 06:41:19.000 3819 3819 599 599 2005-08-02 07:23:19.000 1 1 2020-12-23 07:17:39
11522 2005-08-17 00:05:05.000 2033 2033 599 599 2005-08-24 04:56:05.000 1 1 2020-12-23 07:18:05
14233 2005-08-21 05:07:08.000 2943 2943 599 599 2005-08-28 03:20:08.000 1 1 2020-12-23 07:18:44
14599 2005-08-21 17:43:42.000 4575 4575 599 599 2005-08-22 18:53:42.000 1 1 2020-12-23 07:18:49
14719 2005-08-21 21:41:57.000 4091 4091 599 599 2005-08-25 20:37:57.000 1 1 2020-12-23 07:18:51
15590 2005-08-23 06:09:44.000 4048 4048 599 599 2005-09-01 06:53:44.000 2 2 2020-12-23 07:19:03
15719 2005-08-23 11:08:46.000 3990 3990 599 599 2005-08-25 07:25:46.000 1 1 2020-12-23 07:19:05
15725 2005-08-23 11:25:00.000 378 378 599 599 2005-08-26 11:46:00.000 1 1 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 11.184ms