home / sakila

rental

25 rows where customer_id = 536

✎ 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
237 2005-05-26 12:15:13.000 241 241 536 536 2005-05-29 18:10:13.000 1 1 2020-12-23 07:15:23
929 2005-05-30 12:32:39.000 4296 4296 536 536 2005-06-06 12:17:39.000 1 1 2020-12-23 07:15:32
1582 2005-06-16 04:31:57.000 163 163 536 536 2005-06-22 01:25:57.000 1 1 2020-12-23 07:15:41
1962 2005-06-17 09:08:58.000 4386 4386 536 536 2005-06-23 14:55:58.000 1 1 2020-12-23 07:15:46
2403 2005-06-18 16:33:22.000 2697 2697 536 536 2005-06-23 19:25:22.000 1 1 2020-12-23 07:15:53
3483 2005-07-05 23:13:51.000 79 79 536 536 2005-07-13 18:31:51.000 1 1 2020-12-23 07:16:08
3514 2005-07-06 00:46:54.000 4546 4546 536 536 2005-07-09 05:47:54.000 1 1 2020-12-23 07:16:08
4448 2005-07-07 23:17:12.000 2768 2768 536 536 2005-07-13 18:26:12.000 1 1 2020-12-23 07:16:22
5196 2005-07-09 10:43:34.000 2278 2278 536 536 2005-07-13 12:10:34.000 2 2 2020-12-23 07:16:33
6400 2005-07-11 22:43:44.000 3289 3289 536 536 2005-07-19 03:58:44.000 2 2 2020-12-23 07:16:51
7065 2005-07-27 03:53:43.000 3570 3570 536 536 2005-07-30 23:41:43.000 2 2 2020-12-23 07:17:01
8535 2005-07-29 10:32:33.000 4489 4489 536 536 2005-07-31 05:46:33.000 1 1 2020-12-23 07:17:22
8679 2005-07-29 16:07:47.000 3549 3549 536 536 2005-08-02 18:37:47.000 1 1 2020-12-23 07:17:25
8958 2005-07-30 03:34:26.000 1556 1556 536 536 2005-08-06 08:14:26.000 1 1 2020-12-23 07:17:29
9411 2005-07-30 20:38:22.000 3484 3484 536 536 2005-08-06 01:23:22.000 2 2 2020-12-23 07:17:35
9727 2005-07-31 08:39:13.000 3076 3076 536 536 2005-08-03 07:54:13.000 1 1 2020-12-23 07:17:40
10019 2005-07-31 18:20:56.000 2114 2114 536 536 2005-08-07 14:25:56.000 1 1 2020-12-23 07:17:44
11473 2005-08-02 21:52:03.000 620 620 536 536 2005-08-09 02:01:03.000 1 1 2020-12-23 07:18:04
11826 2005-08-17 12:43:46.000 1837 1837 536 536 2005-08-19 16:59:46.000 2 2 2020-12-23 07:18:09
11977 2005-08-17 18:01:15.000 1528 1528 536 536 2005-08-23 23:03:15.000 1 1 2020-12-23 07:18:11
12052 2005-08-17 20:57:02.000 99 99 536 536 2005-08-25 19:04:02.000 1 1 2020-12-23 07:18:12
13505 2005-08-20 02:05:57.000 914 914 536 536 2005-08-23 05:52:57.000 1 1 2020-12-23 07:18:33
15130 2005-08-22 13:04:32.000 2375 2375 536 536 2005-08-30 17:24:32.000 1 1 2020-12-23 07:18:57
15978 2005-08-23 20:08:18.000 4444 4444 536 536 2005-08-31 17:35:18.000 2 2 2020-12-23 07:19:09
15979 2005-08-23 20:08:26.000 3733 3733 536 536 2005-08-26 19:19:26.000 1 1 2020-12-23 07:19:09

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