home / sakila

rental

25 rows where customer_id = 188

✎ 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
1527 2005-06-16 00:31:40.000 296 296 188 188 2005-06-21 05:20:40.000 1 1 2020-12-23 07:15:40
1927 2005-06-17 06:48:19.000 3304 3304 188 188 2005-06-21 03:23:19.000 1 1 2020-12-23 07:15:46
2515 2005-06-18 23:57:31.000 3213 3213 188 188 2005-06-22 05:31:31.000 2 2 2020-12-23 07:15:54
2733 2005-06-19 15:21:53.000 1535 1535 188 188 2005-06-23 11:58:53.000 2 2 2020-12-23 07:15:57
3848 2005-07-06 16:47:32.000 2906 2906 188 188 2005-07-14 15:00:32.000 1 1 2020-12-23 07:16:13
4150 2005-07-07 08:43:22.000 4424 4424 188 188 2005-07-08 05:21:22.000 2 2 2020-12-23 07:16:18
5356 2005-07-09 18:08:28.000 2905 2905 188 188 2005-07-14 14:11:28.000 2 2 2020-12-23 07:16:36
5729 2005-07-10 11:27:25.000 4137 4137 188 188 2005-07-15 06:13:25.000 2 2 2020-12-23 07:16:41
6555 2005-07-12 05:08:16.000 1282 1282 188 188 2005-07-14 04:09:16.000 1 1 2020-12-23 07:16:53
7042 2005-07-27 03:20:18.000 399 399 188 188 2005-08-01 02:23:18.000 1 1 2020-12-23 07:17:00
7556 2005-07-27 22:17:17.000 794 794 188 188 2005-07-28 19:17:17.000 2 2 2020-12-23 07:17:08
9613 2005-07-31 03:58:53.000 3251 3251 188 188 2005-08-02 00:10:53.000 1 1 2020-12-23 07:17:38
10453 2005-08-01 09:13:27.000 1531 1531 188 188 2005-08-08 11:34:27.000 2 2 2020-12-23 07:17:50
10494 2005-08-01 10:45:21.000 847 847 188 188 2005-08-02 12:34:21.000 1 1 2020-12-23 07:17:51
10719 2005-08-01 19:00:28.000 3861 3861 188 188 2005-08-07 17:04:28.000 1 1 2020-12-23 07:17:54
10757 2005-08-01 20:22:44.000 102 102 188 188 2005-08-04 19:48:44.000 2 2 2020-12-23 07:17:54
11378 2005-08-02 18:16:52.000 3824 3824 188 188 2005-08-03 14:25:52.000 1 1 2020-12-23 07:18:03
13570 2005-08-20 05:04:57.000 2808 2808 188 188 2005-08-24 06:19:57.000 2 2 2020-12-23 07:18:34
13787 2005-08-20 12:15:23.000 253 253 188 188 2005-08-27 06:24:23.000 2 2 2020-12-23 07:18:37
14399 2005-08-21 10:33:23.000 3582 3582 188 188 2005-08-27 08:00:23.000 1 1 2020-12-23 07:18:46
14503 2006-02-14 15:16:03.000 2144 2144 188 188   1 1 2020-12-23 07:18:48
14809 2005-08-22 01:00:42.000 1077 1077 188 188 2005-08-29 19:55:42.000 1 1 2020-12-23 07:18:52
15319 2005-08-22 20:17:17.000 3041 3041 188 188 2005-08-25 01:06:17.000 2 2 2020-12-23 07:19:00
15409 2005-08-22 23:26:32.000 560 560 188 188 2005-08-24 22:44:32.000 1 1 2020-12-23 07:19:01
15474 2005-08-23 01:39:10.000 3015 3015 188 188 2005-08-23 21:46:10.000 2 2 2020-12-23 07:19:02

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