home / sakila

rental

22 rows where customer_id = 189

✎ 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
1117 2005-05-31 16:15:31.000 4125 4125 189 189 2005-06-04 17:20:31.000 1 1 2020-12-23 07:15:35
1541 2005-06-16 01:15:59.000 1911 1911 189 189 2005-06-22 21:26:59.000 2 2 2020-12-23 07:15:40
1834 2005-06-16 22:49:08.000 4018 4018 189 189 2005-06-22 21:08:08.000 1 1 2020-12-23 07:15:44
2905 2005-06-20 02:56:16.000 3898 3898 189 189 2005-06-24 23:51:16.000 2 2 2020-12-23 07:15:59
3108 2005-06-20 17:28:43.000 2218 2218 189 189 2005-06-27 21:23:43.000 1 1 2020-12-23 07:16:02
3346 2005-06-21 11:06:53.000 4393 4393 189 189 2005-06-22 15:19:53.000 2 2 2020-12-23 07:16:06
3763 2005-07-06 12:56:31.000 1573 1573 189 189 2005-07-09 14:49:31.000 1 1 2020-12-23 07:16:12
3813 2005-07-06 15:23:34.000 4100 4100 189 189 2005-07-08 19:03:34.000 1 1 2020-12-23 07:16:13
4203 2005-07-07 11:24:14.000 2743 2743 189 189 2005-07-11 16:26:14.000 1 1 2020-12-23 07:16:19
6193 2005-07-11 11:46:57.000 465 465 189 189 2005-07-19 14:11:57.000 2 2 2020-12-23 07:16:48
7469 2005-07-27 18:57:40.000 3723 3723 189 189 2005-07-31 00:17:40.000 1 1 2020-12-23 07:17:07
7675 2005-07-28 02:55:20.000 153 153 189 189 2005-07-31 05:27:20.000 1 1 2020-12-23 07:17:10
7790 2005-07-28 07:22:35.000 2327 2327 189 189 2005-07-30 02:59:35.000 1 1 2020-12-23 07:17:11
9171 2005-07-30 11:36:24.000 1832 1832 189 189 2005-08-07 06:04:24.000 2 2 2020-12-23 07:17:32
9386 2005-07-30 19:26:21.000 1123 1123 189 189 2005-08-05 21:00:21.000 2 2 2020-12-23 07:17:35
9506 2005-07-31 00:19:01.000 3872 3872 189 189 2005-08-02 00:20:01.000 1 1 2020-12-23 07:17:36
10247 2005-08-01 02:34:06.000 4035 4035 189 189 2005-08-09 02:33:06.000 1 1 2020-12-23 07:17:47
11059 2005-08-02 06:41:38.000 428 428 189 189 2005-08-09 04:34:38.000 1 1 2020-12-23 07:17:58
13601 2005-08-20 06:01:15.000 2166 2166 189 189 2005-08-29 06:14:15.000 2 2 2020-12-23 07:18:34
13766 2005-08-20 11:42:01.000 1313 1313 189 189 2005-08-27 13:44:01.000 2 2 2020-12-23 07:18:37
15773 2005-08-23 13:24:57.000 1626 1626 189 189 2005-08-31 14:16:57.000 2 2 2020-12-23 07:19:06
16008 2005-08-23 21:04:51.000 3273 3273 189 189 2005-08-31 22:09:51.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.684ms