home / sakila

rental

30 rows where customer_id = 336

✎ 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
1478 2005-06-15 21:12:13.000 435 435 336 336 2005-06-18 21:43:13.000 2 2 2020-12-23 07:15:39
2212 2005-06-18 02:36:10.000 2458 2458 336 336 2005-06-19 21:21:10.000 1 1 2020-12-23 07:15:50
2475 2005-06-18 20:52:46.000 889 889 336 336 2005-06-21 19:40:46.000 2 2 2020-12-23 07:15:54
2575 2005-06-19 04:32:52.000 354 354 336 336 2005-06-24 09:37:52.000 1 1 2020-12-23 07:15:55
2719 2005-06-19 14:50:19.000 1200 1200 336 336 2005-06-20 14:33:19.000 2 2 2020-12-23 07:15:57
2954 2005-06-20 06:45:00.000 377 377 336 336 2005-06-23 11:43:00.000 1 1 2020-12-23 07:16:00
3204 2005-06-21 00:37:50.000 2848 2848 336 336 2005-06-22 23:46:50.000 1 1 2020-12-23 07:16:03
3349 2005-06-21 11:17:35.000 3885 3885 336 336 2005-06-22 12:51:35.000 2 2 2020-12-23 07:16:06
4323 2005-07-07 17:55:53.000 1287 1287 336 336 2005-07-13 16:43:53.000 2 2 2020-12-23 07:16:20
4595 2005-07-08 06:40:25.000 760 760 336 336 2005-07-14 08:54:25.000 1 1 2020-12-23 07:16:24
5649 2005-07-10 07:15:07.000 1349 1349 336 336 2005-07-12 11:57:07.000 2 2 2020-12-23 07:16:40
5667 2005-07-10 08:11:03.000 683 683 336 336 2005-07-15 08:23:03.000 2 2 2020-12-23 07:16:40
6263 2005-07-11 15:33:50.000 2391 2391 336 336 2005-07-17 12:49:50.000 2 2 2020-12-23 07:16:49
6382 2005-07-11 21:58:53.000 3223 3223 336 336 2005-07-17 21:18:53.000 2 2 2020-12-23 07:16:50
8275 2005-07-29 01:35:47.000 4432 4432 336 336 2005-07-30 02:16:47.000 1 1 2020-12-23 07:17:18
8407 2005-07-29 06:37:02.000 2985 2985 336 336 2005-08-04 03:13:02.000 1 1 2020-12-23 07:17:21
8607 2005-07-29 13:18:00.000 4290 4290 336 336 2005-07-30 18:51:00.000 2 2 2020-12-23 07:17:23
8951 2005-07-30 03:18:24.000 127 127 336 336 2005-08-08 08:50:24.000 2 2 2020-12-23 07:17:28
9306 2005-07-30 16:47:17.000 3983 3983 336 336 2005-08-02 22:15:17.000 1 1 2020-12-23 07:17:34
10055 2005-07-31 19:15:58.000 2725 2725 336 336 2005-08-05 20:23:58.000 1 1 2020-12-23 07:17:44
11743 2005-08-17 08:49:05.000 294 294 336 336 2005-08-22 08:53:05.000 2 2 2020-12-23 07:18:08
12323 2005-08-18 06:36:22.000 4107 4107 336 336 2005-08-26 11:36:22.000 1 1 2020-12-23 07:18:16
12794 2005-08-19 00:20:37.000 1586 1586 336 336 2005-08-26 01:48:37.000 1 1 2020-12-23 07:18:22
12926 2005-08-19 05:00:16.000 23 23 336 336 2005-08-26 06:12:16.000 2 2 2020-12-23 07:18:24
13022 2006-02-14 15:16:03.000 2266 2266 336 336   2 2 2020-12-23 07:18:26
13066 2005-08-19 09:50:39.000 3730 3730 336 336 2005-08-22 14:01:39.000 1 1 2020-12-23 07:18:26
13689 2005-08-20 09:04:30.000 819 819 336 336 2005-08-22 05:38:30.000 2 2 2020-12-23 07:18:36
14295 2005-08-21 07:09:27.000 2187 2187 336 336 2005-08-22 01:27:27.000 2 2 2020-12-23 07:18:45
15073 2005-08-22 11:01:15.000 3970 3970 336 336 2005-08-31 09:23:15.000 1 1 2020-12-23 07:18:56
15848 2005-08-23 15:41:12.000 2141 2141 336 336 2005-08-26 10:29:12.000 2 2 2020-12-23 07:19:07

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