home / sakila

rental

26 rows where customer_id = 411

✎ 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
686 2005-05-29 00:27:10.000 2441 2441 411 411 2005-05-30 02:29:10.000 1 1 2020-12-23 07:15:29
972 2005-05-30 20:21:07.000 2 2 411 411 2005-06-06 00:36:07.000 1 1 2020-12-23 07:15:33
1985 2005-06-17 10:31:37.000 87 87 411 411 2005-06-22 11:17:37.000 1 1 2020-12-23 07:15:47
1997 2005-06-17 11:19:43.000 846 846 411 411 2005-06-19 14:18:43.000 1 1 2020-12-23 07:15:47
2712 2005-06-19 14:20:13.000 3132 3132 411 411 2005-06-22 19:08:13.000 1 1 2020-12-23 07:15:57
3928 2005-07-06 20:52:09.000 1960 1960 411 411 2005-07-08 18:51:09.000 1 1 2020-12-23 07:16:14
4146 2005-07-07 08:30:16.000 176 176 411 411 2005-07-12 07:52:16.000 1 1 2020-12-23 07:16:18
4246 2005-07-07 13:49:03.000 1141 1141 411 411 2005-07-09 13:01:03.000 1 1 2020-12-23 07:16:19
5357 2005-07-09 18:08:59.000 1988 1988 411 411 2005-07-16 17:28:59.000 2 2 2020-12-23 07:16:36
5800 2005-07-10 14:58:36.000 2466 2466 411 411 2005-07-11 19:50:36.000 2 2 2020-12-23 07:16:42
7102 2005-07-27 05:07:21.000 1081 1081 411 411 2005-08-01 09:41:21.000 2 2 2020-12-23 07:17:01
7395 2005-07-27 16:03:11.000 2888 2888 411 411 2005-07-31 20:26:11.000 2 2 2020-12-23 07:17:06
7513 2005-07-27 20:51:04.000 939 939 411 411 2005-08-03 20:15:04.000 2 2 2020-12-23 07:17:07
7813 2005-07-28 08:08:27.000 4216 4216 411 411 2005-07-30 03:08:27.000 2 2 2020-12-23 07:17:12
8023 2005-07-28 15:53:29.000 2133 2133 411 411 2005-07-31 12:26:29.000 1 1 2020-12-23 07:17:15
8613 2005-07-29 13:30:58.000 394 394 411 411 2005-08-05 16:21:58.000 2 2 2020-12-23 07:17:24
9622 2005-07-31 04:21:45.000 2255 2255 411 411 2005-08-02 09:20:45.000 1 1 2020-12-23 07:17:38
11294 2005-08-02 15:08:27.000 855 855 411 411 2005-08-03 18:28:27.000 1 1 2020-12-23 07:18:02
11997 2005-08-17 18:34:38.000 2193 2193 411 411 2005-08-26 00:12:38.000 2 2 2020-12-23 07:18:11
13246 2006-02-14 15:16:03.000 1849 1849 411 411   2 2 2020-12-23 07:18:29
13634 2005-08-20 07:16:45.000 850 850 411 411 2005-08-22 03:38:45.000 1 1 2020-12-23 07:18:35
13656 2005-08-20 08:01:07.000 3180 3180 411 411 2005-08-28 13:16:07.000 2 2 2020-12-23 07:18:35
14480 2005-08-21 13:36:40.000 229 229 411 411 2005-08-26 08:39:40.000 1 1 2020-12-23 07:18:47
14772 2005-08-21 23:50:39.000 4047 4047 411 411 2005-08-30 20:44:39.000 2 2 2020-12-23 07:18:51
14996 2005-08-22 07:52:41.000 1178 1178 411 411 2005-08-29 02:35:41.000 1 1 2020-12-23 07:18:55
15936 2005-08-23 18:43:11.000 1293 1293 411 411 2005-08-26 00:19:11.000 1 1 2020-12-23 07:19:08

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