home / sakila

rental

26 rows where customer_id = 111

✎ 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
505 2005-05-28 02:06:37.000 71 71 111 111 2005-05-29 06:57:37.000 1 1 2020-12-23 07:15:26
1593 2005-06-16 05:14:52.000 766 766 111 111 2005-06-24 08:00:52.000 2 2 2020-12-23 07:15:41
1974 2005-06-17 09:30:05.000 1979 1979 111 111 2005-06-21 12:10:05.000 1 1 2020-12-23 07:15:46
1999 2005-06-17 11:30:08.000 3704 3704 111 111 2005-06-23 08:36:08.000 1 1 2020-12-23 07:15:47
2297 2005-06-18 08:17:41.000 2262 2262 111 111 2005-06-26 05:08:41.000 2 2 2020-12-23 07:15:51
3087 2005-06-20 15:53:59.000 1305 1305 111 111 2005-06-27 10:54:59.000 2 2 2020-12-23 07:16:02
3333 2005-06-21 10:01:36.000 3688 3688 111 111 2005-06-25 10:27:36.000 2 2 2020-12-23 07:16:05
3485 2005-07-05 23:25:54.000 117 117 111 111 2005-07-09 17:38:54.000 1 1 2020-12-23 07:16:08
3551 2005-07-06 02:33:48.000 3602 3602 111 111 2005-07-13 04:38:48.000 1 1 2020-12-23 07:16:09
3963 2005-07-06 22:19:17.000 3912 3912 111 111 2005-07-15 01:22:17.000 2 2 2020-12-23 07:16:15
4249 2005-07-07 14:05:17.000 4185 4185 111 111 2005-07-10 09:21:17.000 2 2 2020-12-23 07:16:19
4286 2005-07-07 15:36:44.000 4496 4496 111 111 2005-07-11 13:04:44.000 2 2 2020-12-23 07:16:20
6896 2005-07-12 21:25:37.000 1266 1266 111 111 2005-07-20 23:51:37.000 1 1 2020-12-23 07:16:58
8525 2005-07-29 10:20:19.000 1322 1322 111 111 2005-07-30 05:49:19.000 2 2 2020-12-23 07:17:22
9933 2005-07-31 15:24:46.000 2349 2349 111 111 2005-08-01 10:00:46.000 1 1 2020-12-23 07:17:43
10039 2005-07-31 18:50:40.000 4391 4391 111 111 2005-08-01 18:49:40.000 2 2 2020-12-23 07:17:44
10602 2005-08-01 14:30:23.000 1506 1506 111 111 2005-08-07 15:20:23.000 1 1 2020-12-23 07:17:52
10952 2005-08-02 03:28:21.000 3218 3218 111 111 2005-08-09 01:41:21.000 1 1 2020-12-23 07:17:57
10990 2005-08-02 04:41:06.000 262 262 111 111 2005-08-10 05:02:06.000 2 2 2020-12-23 07:17:57
11239 2005-08-02 13:27:11.000 189 189 111 111 2005-08-03 14:36:11.000 1 1 2020-12-23 07:18:01
12196 2005-08-18 02:08:48.000 4302 4302 111 111 2005-08-26 00:39:48.000 1 1 2020-12-23 07:18:14
13251 2005-08-19 16:48:37.000 4216 4216 111 111 2005-08-20 16:33:37.000 1 1 2020-12-23 07:18:29
13525 2005-08-20 02:50:44.000 3514 3514 111 111 2005-08-26 22:58:44.000 2 2 2020-12-23 07:18:33
14949 2005-08-22 06:12:16.000 2434 2434 111 111 2005-08-25 08:25:16.000 2 2 2020-12-23 07:18:54
15174 2005-08-22 15:26:36.000 19 19 111 111 2005-08-31 10:47:36.000 2 2 2020-12-23 07:18:57
15542 2006-02-14 15:16:03.000 21 21 111 111   1 1 2020-12-23 07:19:03

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