home / sakila

rental

24 rows where customer_id = 127

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
452 2005-05-27 19:30:33.000 2993 2993 127 127 2005-05-30 20:53:33.000 2 2 2020-12-23 07:15:26
708 2005-05-29 03:23:47.000 3133 3133 127 127 2005-05-31 21:27:47.000 2 2 2020-12-23 07:15:29
1293 2005-06-15 09:06:24.000 2882 2882 127 127 2005-06-18 06:58:24.000 1 1 2020-12-23 07:15:37
1803 2005-06-16 20:32:47.000 3784 3784 127 127 2005-06-21 02:03:47.000 1 1 2020-12-23 07:15:44
2412 2005-06-18 16:58:58.000 1946 1946 127 127 2005-06-27 22:57:58.000 1 1 2020-12-23 07:15:53
4652 2005-07-08 09:47:51.000 4198 4198 127 127 2005-07-16 04:09:51.000 2 2 2020-12-23 07:16:25
4811 2005-07-08 17:04:24.000 4032 4032 127 127 2005-07-12 16:41:24.000 2 2 2020-12-23 07:16:28
5499 2005-07-10 00:27:45.000 1525 1525 127 127 2005-07-17 06:11:45.000 1 1 2020-12-23 07:16:38
5983 2005-07-11 00:34:11.000 351 351 127 127 2005-07-15 05:37:11.000 1 1 2020-12-23 07:16:45
7912 2005-07-28 11:46:58.000 745 745 127 127 2005-08-05 12:50:58.000 1 1 2020-12-23 07:17:13
8209 2005-07-28 23:29:28.000 2484 2484 127 127 2005-08-07 04:22:28.000 2 2 2020-12-23 07:17:18
9859 2005-07-31 13:02:55.000 4094 4094 127 127 2005-08-05 11:04:55.000 1 1 2020-12-23 07:17:42
10197 2005-08-01 00:35:25.000 1186 1186 127 127 2005-08-07 06:04:25.000 2 2 2020-12-23 07:17:46
10787 2005-08-01 21:35:01.000 3246 3246 127 127 2005-08-10 23:30:01.000 1 1 2020-12-23 07:17:55
10973 2005-08-02 04:09:42.000 3562 3562 127 127 2005-08-08 05:24:42.000 2 2 2020-12-23 07:17:57
11235 2005-08-02 13:13:21.000 2501 2501 127 127 2005-08-03 07:17:21.000 1 1 2020-12-23 07:18:01
12060 2005-08-17 21:11:57.000 2373 2373 127 127 2005-08-21 01:42:57.000 1 1 2020-12-23 07:18:12
12820 2005-08-19 01:05:08.000 2936 2936 127 127 2005-08-21 05:37:08.000 2 2 2020-12-23 07:18:22
13043 2005-08-19 09:07:13.000 24 24 127 127 2005-08-27 07:49:13.000 1 1 2020-12-23 07:18:26
13091 2005-08-19 10:40:10.000 1815 1815 127 127 2005-08-23 09:03:10.000 1 1 2020-12-23 07:18:27
14030 2005-08-20 21:23:54.000 1027 1027 127 127 2005-08-27 01:19:54.000 1 1 2020-12-23 07:18:41
14189 2005-08-21 03:32:17.000 2209 2209 127 127 2005-08-22 04:46:17.000 2 2 2020-12-23 07:18:44
15463 2005-08-23 01:15:07.000 863 863 127 127 2005-08-29 06:50:07.000 1 1 2020-12-23 07:19:02
15736 2005-08-23 11:40:30.000 4272 4272 127 127 2005-08-30 12:40:30.000 1 1 2020-12-23 07:19:05

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