home / sakila

rental

22 rows where customer_id = 539

✎ 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
250 2005-05-26 14:30:24.000 368 368 539 539 2005-05-27 08:50:24.000 1 1 2020-12-23 07:15:23
342 2005-05-27 04:11:04.000 4019 4019 539 539 2005-05-29 01:28:04.000 2 2 2020-12-23 07:15:24
1282 2005-06-15 08:25:33.000 186 186 539 539 2005-06-21 04:02:33.000 1 1 2020-12-23 07:15:37
1327 2005-06-15 11:11:39.000 403 403 539 539 2005-06-22 10:45:39.000 1 1 2020-12-23 07:15:37
1444 2005-06-15 19:08:16.000 1303 1303 539 539 2005-06-24 15:20:16.000 2 2 2020-12-23 07:15:39
4035 2005-07-07 02:45:02.000 3611 3611 539 539 2005-07-14 01:41:02.000 1 1 2020-12-23 07:16:16
4247 2005-07-07 13:51:54.000 808 808 539 539 2005-07-10 09:43:54.000 2 2 2020-12-23 07:16:19
5086 2005-07-09 05:40:04.000 3072 3072 539 539 2005-07-16 07:51:04.000 1 1 2020-12-23 07:16:32
5139 2005-07-09 08:01:51.000 51 51 539 539 2005-07-18 09:16:51.000 2 2 2020-12-23 07:16:33
5493 2005-07-10 00:11:44.000 2037 2037 539 539 2005-07-15 19:24:44.000 2 2 2020-12-23 07:16:38
6874 2005-07-12 20:20:53.000 4478 4478 539 539 2005-07-19 19:41:53.000 1 1 2020-12-23 07:16:58
7781 2005-07-28 07:13:20.000 541 541 539 539 2005-08-06 05:43:20.000 2 2 2020-12-23 07:17:11
8247 2005-07-29 00:41:38.000 2607 2607 539 539 2005-08-06 20:29:38.000 2 2 2020-12-23 07:17:18
8761 2005-07-29 19:26:47.000 1317 1317 539 539 2005-08-08 00:09:47.000 1 1 2020-12-23 07:17:26
9250 2005-07-30 14:18:16.000 4544 4544 539 539 2005-08-04 12:31:16.000 1 1 2020-12-23 07:17:33
9777 2005-07-31 10:01:06.000 225 225 539 539 2005-08-08 04:44:06.000 2 2 2020-12-23 07:17:41
9796 2005-07-31 10:52:43.000 1038 1038 539 539 2005-08-09 06:08:43.000 1 1 2020-12-23 07:17:41
10922 2005-08-02 02:14:40.000 4522 4522 539 539 2005-08-06 06:04:40.000 1 1 2020-12-23 07:17:57
12848 2005-08-19 02:05:11.000 2833 2833 539 539 2005-08-24 05:27:11.000 2 2 2020-12-23 07:18:23
13615 2005-08-20 06:28:53.000 1864 1864 539 539 2005-08-27 11:40:53.000 2 2 2020-12-23 07:18:34
13778 2005-08-20 12:03:44.000 2385 2385 539 539 2005-08-28 12:09:44.000 1 1 2020-12-23 07:18:37
15356 2005-08-22 21:24:19.000 4507 4507 539 539 2005-08-25 22:32:19.000 2 2 2020-12-23 07:19:00

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