home / sakila

rental

38 rows where customer_id = 295

✎ 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
371 2005-05-27 08:08:18.000 1235 1235 295 295 2005-06-05 03:05:18.000 2 2 2020-12-23 07:15:24
1184 2005-06-15 00:49:36.000 473 473 295 295 2005-06-22 23:39:36.000 2 2 2020-12-23 07:15:35
1328 2005-06-15 11:23:27.000 3665 3665 295 295 2005-06-19 12:42:27.000 2 2 2020-12-23 07:15:37
1935 2005-06-17 07:14:15.000 1962 1962 295 295 2005-06-20 05:59:15.000 1 1 2020-12-23 07:15:46
2054 2005-06-17 15:26:37.000 1588 1588 295 295 2005-06-26 14:22:37.000 1 1 2020-12-23 07:15:48
2431 2005-06-18 17:53:03.000 1383 1383 295 295 2005-06-25 15:08:03.000 2 2 2020-12-23 07:15:53
2638 2005-06-19 09:23:30.000 2944 2944 295 295 2005-06-26 14:56:30.000 1 1 2020-12-23 07:15:56
2999 2005-06-20 09:30:34.000 735 735 295 295 2005-06-26 05:51:34.000 2 2 2020-12-23 07:16:01
3198 2005-06-21 00:08:54.000 1626 1626 295 295 2005-06-29 02:11:54.000 2 2 2020-12-23 07:16:03
3394 2005-06-21 15:17:39.000 3393 3393 295 295 2005-06-30 13:55:39.000 2 2 2020-12-23 07:16:06
3496 2005-07-05 23:59:15.000 2430 2430 295 295 2005-07-09 19:39:15.000 2 2 2020-12-23 07:16:08
3876 2005-07-06 18:21:13.000 4039 4039 295 295 2005-07-14 16:57:13.000 2 2 2020-12-23 07:16:14
4164 2005-07-07 09:20:11.000 3133 3133 295 295 2005-07-14 09:35:11.000 1 1 2020-12-23 07:16:18
4432 2005-07-07 22:40:02.000 2779 2779 295 295 2005-07-15 01:46:02.000 1 1 2020-12-23 07:16:22
5019 2005-07-09 02:04:32.000 3534 3534 295 295 2005-07-15 07:01:32.000 2 2 2020-12-23 07:16:31
5053 2005-07-09 03:59:46.000 570 570 295 295 2005-07-09 23:53:46.000 2 2 2020-12-23 07:16:31
5283 2005-07-09 15:07:17.000 644 644 295 295 2005-07-17 09:52:17.000 2 2 2020-12-23 07:16:35
5994 2005-07-11 01:14:10.000 4287 4287 295 295 2005-07-12 00:42:10.000 2 2 2020-12-23 07:16:45
6252 2005-07-11 15:06:29.000 1294 1294 295 295 2005-07-16 14:07:29.000 1 1 2020-12-23 07:16:48
6331 2005-07-11 19:17:21.000 1356 1356 295 295 2005-07-18 18:35:21.000 2 2 2020-12-23 07:16:50
8087 2005-07-28 18:21:16.000 1913 1913 295 295 2005-08-03 12:38:16.000 2 2 2020-12-23 07:17:16
8108 2005-07-28 19:07:38.000 1600 1600 295 295 2005-08-03 15:13:38.000 2 2 2020-12-23 07:17:16
8840 2005-07-29 22:55:38.000 1484 1484 295 295 2005-08-06 02:11:38.000 1 1 2020-12-23 07:17:27
8932 2005-07-30 02:31:26.000 4537 4537 295 295 2005-08-04 02:17:26.000 2 2 2020-12-23 07:17:28
9425 2005-07-30 21:11:21.000 271 271 295 295 2005-08-05 19:00:21.000 1 1 2020-12-23 07:17:35
9692 2005-07-31 07:11:04.000 3481 3481 295 295 2005-08-07 06:34:04.000 2 2 2020-12-23 07:17:39
9793 2005-07-31 10:45:11.000 4576 4576 295 295 2005-08-03 14:29:11.000 1 1 2020-12-23 07:17:41
10160 2005-07-31 23:07:40.000 863 863 295 295 2005-08-05 23:34:40.000 1 1 2020-12-23 07:17:46
10222 2005-08-01 01:17:42.000 1214 1214 295 295 2005-08-08 02:45:42.000 1 1 2020-12-23 07:17:47
10349 2005-08-01 05:27:13.000 114 114 295 295 2005-08-08 10:15:13.000 1 1 2020-12-23 07:17:48
11083 2005-08-02 07:32:01.000 4395 4395 295 295 2005-08-08 02:23:01.000 1 1 2020-12-23 07:17:59
11913 2005-08-17 15:53:17.000 741 741 295 295 2005-08-24 18:50:17.000 2 2 2020-12-23 07:18:10
12041 2005-08-17 20:34:33.000 2389 2389 295 295 2005-08-19 00:47:33.000 1 1 2020-12-23 07:18:12
12383 2005-08-18 08:36:03.000 1641 1641 295 295 2005-08-23 03:30:03.000 2 2 2020-12-23 07:18:16
14264 2005-08-21 06:18:22.000 3426 3426 295 295 2005-08-25 08:08:22.000 1 1 2020-12-23 07:18:45
14387 2005-08-21 10:10:01.000 1286 1286 295 295 2005-08-28 14:16:01.000 2 2 2020-12-23 07:18:46
14514 2005-08-21 14:51:52.000 1259 1259 295 295 2005-08-30 10:40:52.000 2 2 2020-12-23 07:18:48
15735 2006-02-14 15:16:03.000 3167 3167 295 295   1 1 2020-12-23 07:19:05

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