home / sakila

rental

26 rows where customer_id = 109

✎ 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
203 2005-05-26 07:27:57.000 3374 3374 109 109 2005-06-03 12:52:57.000 1 1 2020-12-23 07:15:22
386 2005-05-27 10:26:31.000 1288 1288 109 109 2005-05-30 08:32:31.000 1 1 2020-12-23 07:15:25
622 2005-05-28 15:58:22.000 2363 2363 109 109 2005-06-04 10:13:22.000 1 1 2020-12-23 07:15:28
698 2005-05-29 02:10:52.000 1412 1412 109 109 2005-06-01 21:52:52.000 1 1 2020-12-23 07:15:29
1061 2005-05-31 08:27:58.000 965 965 109 109 2005-06-07 02:34:58.000 1 1 2020-12-23 07:15:34
1106 2005-05-31 14:36:52.000 4185 4185 109 109 2005-06-01 14:33:52.000 2 2 2020-12-23 07:15:34
1115 2005-05-31 16:07:09.000 2140 2140 109 109 2005-06-04 18:51:09.000 1 1 2020-12-23 07:15:35
1581 2005-06-16 04:28:45.000 4004 4004 109 109 2005-06-18 07:07:45.000 1 1 2020-12-23 07:15:41
1891 2005-06-17 04:16:44.000 3576 3576 109 109 2005-06-24 07:20:44.000 1 1 2020-12-23 07:15:45
2198 2005-06-18 01:51:22.000 1983 1983 109 109 2005-06-26 06:57:22.000 2 2 2020-12-23 07:15:50
2679 2005-06-19 12:12:30.000 1994 1994 109 109 2005-06-27 08:27:30.000 1 1 2020-12-23 07:15:56
3076 2005-06-20 15:01:19.000 1344 1344 109 109 2005-06-28 16:53:19.000 2 2 2020-12-23 07:16:02
4921 2005-07-08 21:43:21.000 425 425 109 109 2005-07-10 16:06:21.000 2 2 2020-12-23 07:16:29
5027 2005-07-09 02:32:37.000 2179 2179 109 109 2005-07-16 23:13:37.000 1 1 2020-12-23 07:16:31
5296 2005-07-09 15:26:27.000 495 495 109 109 2005-07-15 10:03:27.000 2 2 2020-12-23 07:16:35
6920 2005-07-12 22:32:58.000 2301 2301 109 109 2005-07-19 20:29:58.000 2 2 2020-12-23 07:16:58
7145 2005-07-27 07:01:00.000 3653 3653 109 109 2005-07-31 02:31:00.000 1 1 2020-12-23 07:17:02
8006 2005-07-28 15:15:41.000 3959 3959 109 109 2005-08-05 19:29:41.000 2 2 2020-12-23 07:17:14
9230 2005-07-30 13:39:42.000 1199 1199 109 109 2005-07-31 19:20:42.000 1 1 2020-12-23 07:17:33
9871 2005-07-31 13:25:46.000 194 194 109 109 2005-08-01 13:12:46.000 2 2 2020-12-23 07:17:42
10240 2005-08-01 02:09:33.000 4494 4494 109 109 2005-08-07 02:22:33.000 2 2 2020-12-23 07:17:47
10892 2005-08-02 01:12:06.000 3243 3243 109 109 2005-08-09 23:53:06.000 1 1 2020-12-23 07:17:56
12137 2005-08-17 23:52:26.000 3632 3632 109 109 2005-08-27 00:19:26.000 1 1 2020-12-23 07:18:13
13264 2005-08-19 17:27:10.000 1881 1881 109 109 2005-08-27 16:00:10.000 1 1 2020-12-23 07:18:29
15398 2005-08-22 23:10:49.000 4451 4451 109 109 2005-08-28 00:49:49.000 2 2 2020-12-23 07:19:01
15677 2005-08-23 09:23:36.000 2050 2050 109 109 2005-08-27 05:01:36.000 1 1 2020-12-23 07:19:04

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