home / sakila

rental

26 rows where customer_id = 202

✎ 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
1474 2005-06-15 20:55:42.000 164 164 202 202 2005-06-19 02:41:42.000 2 2 2020-12-23 07:15:39
1535 2005-06-16 00:52:04.000 1096 1096 202 202 2005-06-20 22:47:04.000 2 2 2020-12-23 07:15:40
3008 2005-06-20 10:23:25.000 3383 3383 202 202 2005-06-26 11:00:25.000 2 2 2020-12-23 07:16:01
3148 2005-06-20 20:27:18.000 4490 4490 202 202 2005-06-24 20:30:18.000 2 2 2020-12-23 07:16:03
3861 2005-07-06 17:24:49.000 4506 4506 202 202 2005-07-15 22:19:49.000 2 2 2020-12-23 07:16:13
4567 2005-07-08 05:20:04.000 4073 4073 202 202 2005-07-10 01:35:04.000 1 1 2020-12-23 07:16:24
5194 2005-07-09 10:31:34.000 3809 3809 202 202 2005-07-15 08:50:34.000 2 2 2020-12-23 07:16:33
5297 2005-07-09 15:32:29.000 3434 3434 202 202 2005-07-14 14:58:29.000 1 1 2020-12-23 07:16:35
5838 2005-07-10 17:04:56.000 1627 1627 202 202 2005-07-11 15:15:56.000 1 1 2020-12-23 07:16:43
7613 2005-07-28 00:13:58.000 4253 4253 202 202 2005-08-06 05:36:58.000 2 2 2020-12-23 07:17:09
8351 2005-07-29 04:50:53.000 2963 2963 202 202 2005-07-30 07:28:53.000 2 2 2020-12-23 07:17:20
8779 2005-07-29 20:15:00.000 3245 3245 202 202 2005-08-03 21:17:00.000 1 1 2020-12-23 07:17:26
8830 2005-07-29 22:34:35.000 1751 1751 202 202 2005-08-05 20:12:35.000 2 2 2020-12-23 07:17:27
8930 2005-07-30 02:28:38.000 1107 1107 202 202 2005-08-02 01:43:38.000 2 2 2020-12-23 07:17:28
9057 2005-07-30 07:14:18.000 3141 3141 202 202 2005-08-01 05:10:18.000 2 2 2020-12-23 07:17:30
9467 2005-07-30 22:45:34.000 1905 1905 202 202 2005-08-08 00:58:34.000 2 2 2020-12-23 07:17:36
9751 2005-07-31 09:20:50.000 36 36 202 202 2005-08-01 05:34:50.000 2 2 2020-12-23 07:17:40
10375 2005-08-01 06:26:22.000 857 857 202 202 2005-08-06 02:51:22.000 2 2 2020-12-23 07:17:49
11210 2005-08-02 12:15:54.000 422 422 202 202 2005-08-04 16:18:54.000 2 2 2020-12-23 07:18:00
11924 2005-08-17 16:22:05.000 1711 1711 202 202 2005-08-26 12:34:05.000 1 1 2020-12-23 07:18:10
12801 2005-08-19 00:27:19.000 960 960 202 202 2005-08-26 03:10:19.000 1 1 2020-12-23 07:18:22
13196 2005-08-19 14:40:32.000 458 458 202 202 2005-08-26 18:15:32.000 2 2 2020-12-23 07:18:28
13528 2005-08-20 03:03:31.000 1847 1847 202 202 2005-08-26 03:09:31.000 1 1 2020-12-23 07:18:33
14019 2005-08-20 20:59:15.000 1929 1929 202 202 2005-08-28 17:29:15.000 2 2 2020-12-23 07:18:41
15095 2005-08-22 11:41:35.000 489 489 202 202 2005-08-25 16:44:35.000 2 2 2020-12-23 07:18:56
15772 2005-08-23 13:22:56.000 4343 4343 202 202 2005-08-26 10:35:56.000 2 2 2020-12-23 07:19:06

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