home / sakila

rental

23 rows where customer_id = 466

✎ 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
1104 2005-05-31 14:30:01.000 1619 1619 466 466 2005-06-05 12:07:01.000 1 1 2020-12-23 07:15:34
1808 2005-06-16 20:59:35.000 2424 2424 466 466 2005-06-24 15:31:35.000 1 1 2020-12-23 07:15:44
2446 2005-06-18 19:04:41.000 1283 1283 466 466 2005-06-27 17:10:41.000 2 2 2020-12-23 07:15:53
3022 2005-06-20 11:17:20.000 3745 3745 466 466 2005-06-26 13:15:20.000 2 2 2020-12-23 07:16:01
3237 2005-06-21 02:47:56.000 4399 4399 466 466 2005-06-27 03:16:56.000 2 2 2020-12-23 07:16:04
3343 2005-06-21 10:56:59.000 2038 2038 466 466 2005-06-25 16:41:59.000 1 1 2020-12-23 07:16:06
5048 2005-07-09 03:46:33.000 1271 1271 466 466 2005-07-15 01:14:33.000 1 1 2020-12-23 07:16:31
5691 2005-07-10 09:29:49.000 3526 3526 466 466 2005-07-16 13:37:49.000 1 1 2020-12-23 07:16:41
6073 2005-07-11 04:54:31.000 4243 4243 466 466 2005-07-20 07:23:31.000 1 1 2020-12-23 07:16:46
7080 2005-07-27 04:25:25.000 710 710 466 466 2005-08-04 04:22:25.000 2 2 2020-12-23 07:17:01
8276 2005-07-29 01:38:43.000 2451 2451 466 466 2005-08-03 23:00:43.000 1 1 2020-12-23 07:17:19
9202 2005-07-30 12:43:24.000 4525 4525 466 466 2005-08-07 10:39:24.000 2 2 2020-12-23 07:17:32
9257 2005-07-30 14:30:38.000 2615 2615 466 466 2005-08-04 17:57:38.000 1 1 2020-12-23 07:17:33
10469 2005-08-01 09:51:11.000 3054 3054 466 466 2005-08-05 06:53:11.000 2 2 2020-12-23 07:17:50
11343 2005-08-02 17:12:30.000 564 564 466 466 2005-08-09 12:08:30.000 1 1 2020-12-23 07:18:02
11359 2005-08-02 17:45:55.000 1648 1648 466 466 2005-08-10 20:53:55.000 2 2 2020-12-23 07:18:03
12048 2005-08-17 20:49:24.000 3773 3773 466 466 2005-08-27 02:01:24.000 2 2 2020-12-23 07:18:12
13478 2005-08-20 01:07:14.000 2190 2190 466 466 2005-08-22 03:41:14.000 1 1 2020-12-23 07:18:32
13884 2005-08-20 15:30:51.000 3182 3182 466 466 2005-08-26 13:34:51.000 1 1 2020-12-23 07:18:39
13988 2005-08-20 19:21:28.000 3567 3567 466 466 2005-08-21 22:20:28.000 2 2 2020-12-23 07:18:40
14546 2005-08-21 15:50:50.000 1515 1515 466 466 2005-08-23 11:37:50.000 2 2 2020-12-23 07:18:48
15230 2005-08-22 17:31:41.000 2572 2572 466 466 2005-08-25 21:57:41.000 2 2 2020-12-23 07:18:58
16005 2005-08-23 21:00:22.000 3265 3265 466 466 2005-09-02 02:35:22.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 12.777ms