home / sakila

rental

29 rows where customer_id = 39

✎ 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
1625 2005-06-16 07:49:08.000 3367 3367 39 39 2005-06-24 09:08:08.000 2 2 2020-12-23 07:15:41
1905 2005-06-17 04:51:43.000 1043 1043 39 39 2005-06-24 09:35:43.000 1 1 2020-12-23 07:15:45
2135 2005-06-17 21:14:02.000 4091 4091 39 39 2005-06-19 00:59:02.000 1 1 2020-12-23 07:15:49
2439 2005-06-18 18:35:04.000 909 909 39 39 2005-06-21 19:47:04.000 2 2 2020-12-23 07:15:53
2631 2005-06-19 08:49:53.000 3471 3471 39 39 2005-06-26 03:25:53.000 1 1 2020-12-23 07:15:56
2876 2005-06-20 01:06:34.000 3117 3117 39 39 2005-06-23 04:55:34.000 1 1 2020-12-23 07:15:59
4419 2005-07-07 22:06:24.000 783 783 39 39 2005-07-15 23:59:24.000 1 1 2020-12-23 07:16:22
4695 2005-07-08 11:07:59.000 805 805 39 39 2005-07-17 16:35:59.000 1 1 2020-12-23 07:16:26
4712 2005-07-08 12:10:50.000 2371 2371 39 39 2005-07-17 14:54:50.000 2 2 2020-12-23 07:16:26
4727 2005-07-08 12:54:15.000 1251 1251 39 39 2005-07-17 14:32:15.000 2 2 2020-12-23 07:16:27
5451 2005-07-09 22:22:10.000 3484 3484 39 39 2005-07-11 02:43:10.000 1 1 2020-12-23 07:16:37
5515 2005-07-10 01:12:44.000 3772 3772 39 39 2005-07-13 00:39:44.000 1 1 2020-12-23 07:16:38
6045 2005-07-11 03:21:05.000 2003 2003 39 39 2005-07-17 23:10:05.000 1 1 2020-12-23 07:16:46
8307 2005-07-29 03:18:34.000 3197 3197 39 39 2005-08-06 05:51:34.000 2 2 2020-12-23 07:17:19
8366 2005-07-29 05:11:14.000 479 479 39 39 2005-08-05 01:48:14.000 1 1 2020-12-23 07:17:20
8723 2005-07-29 18:03:47.000 224 224 39 39 2005-08-06 18:53:47.000 1 1 2020-12-23 07:17:25
8805 2005-07-29 21:29:58.000 4041 4041 39 39 2005-08-04 23:12:58.000 1 1 2020-12-23 07:17:26
9431 2005-07-30 21:24:22.000 3364 3364 39 39 2005-08-03 01:22:22.000 2 2 2020-12-23 07:17:35
9656 2005-07-31 06:00:21.000 4215 4215 39 39 2005-08-05 04:36:21.000 1 1 2020-12-23 07:17:39
10052 2005-07-31 19:15:13.000 3307 3307 39 39 2005-08-07 22:47:13.000 2 2 2020-12-23 07:17:44
10126 2005-07-31 21:36:07.000 3 3 39 39 2005-08-03 23:59:07.000 1 1 2020-12-23 07:17:45
10251 2005-08-01 02:39:12.000 2986 2986 39 39 2005-08-06 03:51:12.000 1 1 2020-12-23 07:17:47
10269 2005-08-01 03:09:26.000 2537 2537 39 39 2005-08-02 00:01:26.000 1 1 2020-12-23 07:17:47
10630 2005-08-01 15:34:46.000 2335 2335 39 39 2005-08-03 10:50:46.000 1 1 2020-12-23 07:17:53
10639 2005-08-01 15:44:43.000 1015 1015 39 39 2005-08-10 13:51:43.000 1 1 2020-12-23 07:17:53
12268 2005-08-18 04:26:54.000 93 93 39 39 2005-08-23 06:40:54.000 2 2 2020-12-23 07:18:15
12459 2005-08-18 11:25:11.000 421 421 39 39 2005-08-22 06:13:11.000 1 1 2020-12-23 07:18:17
13101 2005-08-19 11:01:54.000 1804 1804 39 39 2005-08-27 16:06:54.000 2 2 2020-12-23 07:18:27
15124 2005-08-22 12:51:38.000 1598 1598 39 39 2005-08-26 09:05:38.000 1 1 2020-12-23 07:18:57

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 14.129ms