home / sakila

rental

23 rows where customer_id = 233

✎ 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
1992 2005-06-17 10:58:53.000 636 636 233 233 2005-06-19 08:42:53.000 2 2 2020-12-23 07:15:47
2244 2005-06-18 04:46:33.000 3629 3629 233 233 2005-06-20 04:28:33.000 1 1 2020-12-23 07:15:50
2424 2005-06-18 17:35:08.000 1884 1884 233 233 2005-06-23 15:33:08.000 1 1 2020-12-23 07:15:53
2443 2005-06-18 18:52:30.000 1622 1622 233 233 2005-06-24 21:27:30.000 1 1 2020-12-23 07:15:53
3832 2005-07-06 16:12:23.000 4499 4499 233 233 2005-07-12 21:29:23.000 1 1 2020-12-23 07:16:13
4015 2005-07-07 00:59:46.000 3032 3032 233 233 2005-07-14 03:16:46.000 2 2 2020-12-23 07:16:16
4885 2005-07-08 19:51:17.000 442 442 233 233 2005-07-12 16:02:17.000 2 2 2020-12-23 07:16:29
5267 2005-07-09 14:21:10.000 2242 2242 233 233 2005-07-15 12:02:10.000 1 1 2020-12-23 07:16:34
5846 2005-07-10 17:25:24.000 938 938 233 233 2005-07-12 13:41:24.000 2 2 2020-12-23 07:16:43
6319 2005-07-11 18:50:45.000 3739 3739 233 233 2005-07-12 15:26:45.000 1 1 2020-12-23 07:16:49
6794 2005-07-12 16:38:23.000 813 813 233 233 2005-07-20 17:36:23.000 2 2 2020-12-23 07:16:57
7056 2005-07-27 03:46:27.000 805 805 233 233 2005-08-05 07:46:27.000 1 1 2020-12-23 07:17:01
7387 2005-07-27 15:54:19.000 3274 3274 233 233 2005-08-03 14:46:19.000 1 1 2020-12-23 07:17:06
8385 2005-07-29 05:39:16.000 4108 4108 233 233 2005-08-03 00:30:16.000 1 1 2020-12-23 07:17:20
8530 2005-07-29 10:26:14.000 4528 4528 233 233 2005-07-31 10:24:14.000 1 1 2020-12-23 07:17:22
8596 2005-07-29 12:48:54.000 59 59 233 233 2005-08-04 07:19:54.000 2 2 2020-12-23 07:17:23
9574 2005-07-31 02:49:20.000 2782 2782 233 233 2005-08-05 02:36:20.000 2 2 2020-12-23 07:17:37
10582 2005-08-01 13:54:22.000 2536 2536 233 233 2005-08-05 16:46:22.000 2 2 2020-12-23 07:17:52
12443 2005-08-18 10:50:59.000 2048 2048 233 233 2005-08-26 07:48:59.000 2 2 2020-12-23 07:18:17
14357 2005-08-21 09:13:09.000 2906 2906 233 233 2005-08-22 05:41:09.000 2 2 2020-12-23 07:18:46
15285 2005-08-22 19:17:24.000 481 481 233 233 2005-08-25 00:25:24.000 1 1 2020-12-23 07:18:59
15790 2005-08-23 14:01:07.000 2887 2887 233 233 2005-08-30 10:32:07.000 2 2 2020-12-23 07:19:06
15821 2005-08-23 15:03:58.000 1714 1714 233 233 2005-08-24 17:46:58.000 2 2 2020-12-23 07:19:07

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