home / sakila

rental

23 rows where customer_id = 364

✎ 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
462 2005-05-27 20:10:36.000 2314 2314 364 364 2005-06-03 21:12:36.000 2 2 2020-12-23 07:15:26
1722 2005-06-16 15:12:52.000 2142 2142 364 364 2005-06-19 13:01:52.000 2 2 2020-12-23 07:15:43
2442 2005-06-18 18:49:18.000 4045 4045 364 364 2005-06-22 16:18:18.000 1 1 2020-12-23 07:15:53
2606 2005-06-19 06:51:32.000 4133 4133 364 364 2005-06-21 03:15:32.000 2 2 2020-12-23 07:15:55
2857 2005-06-19 23:15:15.000 2886 2886 364 364 2005-06-25 04:24:15.000 2 2 2020-12-23 07:15:59
2962 2005-06-20 07:31:55.000 2978 2978 364 364 2005-06-26 04:43:55.000 1 1 2020-12-23 07:16:00
3678 2005-07-06 09:15:15.000 3861 3861 364 364 2005-07-10 05:01:15.000 1 1 2020-12-23 07:16:11
3961 2005-07-06 22:11:43.000 4320 4320 364 364 2005-07-09 03:14:43.000 1 1 2020-12-23 07:16:15
4047 2005-07-07 03:28:49.000 3475 3475 364 364 2005-07-09 02:42:49.000 2 2 2020-12-23 07:16:16
4689 2005-07-08 11:03:47.000 2519 2519 364 364 2005-07-16 06:07:47.000 2 2 2020-12-23 07:16:26
5872 2005-07-10 18:54:05.000 270 270 364 364 2005-07-19 15:41:05.000 1 1 2020-12-23 07:16:43
7272 2005-07-27 11:30:20.000 250 250 364 364 2005-07-29 17:16:20.000 2 2 2020-12-23 07:17:04
9266 2005-07-30 14:59:01.000 1705 1705 364 364 2005-07-31 17:01:01.000 2 2 2020-12-23 07:17:33
10092 2005-07-31 20:28:09.000 4151 4151 364 364 2005-08-01 21:37:09.000 1 1 2020-12-23 07:17:45
10290 2005-08-01 03:39:50.000 4542 4542 364 364 2005-08-08 22:29:50.000 2 2 2020-12-23 07:17:48
11932 2005-08-17 16:36:12.000 151 151 364 364 2005-08-18 19:34:12.000 2 2 2020-12-23 07:18:10
12557 2005-08-18 14:51:03.000 313 313 364 364 2005-08-19 13:30:03.000 2 2 2020-12-23 07:18:19
12761 2005-08-18 23:05:22.000 2684 2684 364 364 2005-08-22 01:08:22.000 2 2 2020-12-23 07:18:22
12912 2005-08-19 04:24:35.000 1747 1747 364 364 2005-08-27 07:13:35.000 2 2 2020-12-23 07:18:24
13698 2005-08-20 09:24:26.000 3829 3829 364 364 2005-08-22 05:04:26.000 2 2 2020-12-23 07:18:36
13936 2005-08-20 17:22:35.000 1731 1731 364 364 2005-08-23 20:07:35.000 2 2 2020-12-23 07:18:40
14293 2005-08-21 07:06:47.000 3555 3555 364 364 2005-08-22 05:07:47.000 2 2 2020-12-23 07:18:45
15242 2005-08-22 17:48:10.000 2106 2106 364 364 2005-08-27 23:32:10.000 1 1 2020-12-23 07:18:58

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 9.659ms