home / sakila

rental

36 rows where customer_id = 439

✎ 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
126 2005-05-25 21:07:59.000 2047 2047 439 439 2005-05-28 18:51:59.000 1 1 2020-12-23 07:15:21
367 2005-05-27 07:37:02.000 3437 3437 439 439 2005-05-30 05:43:02.000 2 2 2020-12-23 07:15:24
786 2005-05-29 15:17:28.000 2637 2637 439 439 2005-06-07 10:07:28.000 2 2 2020-12-23 07:15:30
1264 2005-06-15 06:59:39.000 4176 4176 439 439 2005-06-18 08:10:39.000 2 2 2020-12-23 07:15:37
1557 2005-06-16 02:28:35.000 2617 2617 439 439 2005-06-16 22:11:35.000 2 2 2020-12-23 07:15:40
2097 2005-06-17 18:40:04.000 569 569 439 439 2005-06-23 13:49:04.000 1 1 2020-12-23 07:15:48
2621 2005-06-19 08:07:31.000 1746 1746 439 439 2005-06-28 05:36:31.000 1 1 2020-12-23 07:15:56
2992 2005-06-20 09:11:51.000 3347 3347 439 439 2005-06-24 05:59:51.000 1 1 2020-12-23 07:16:01
3294 2005-06-21 07:03:23.000 2390 2390 439 439 2005-06-30 02:22:23.000 2 2 2020-12-23 07:16:05
3774 2005-07-06 13:25:07.000 4044 4044 439 439 2005-07-15 12:56:07.000 2 2 2020-12-23 07:16:12
4528 2005-07-08 03:24:54.000 3209 3209 439 439 2005-07-09 03:50:54.000 2 2 2020-12-23 07:16:23
4813 2005-07-08 17:09:56.000 2752 2752 439 439 2005-07-09 22:29:56.000 1 1 2020-12-23 07:16:28
5801 2005-07-10 14:59:05.000 3511 3511 439 439 2005-07-14 17:55:05.000 2 2 2020-12-23 07:16:42
5893 2005-07-10 20:05:30.000 1689 1689 439 439 2005-07-14 23:05:30.000 1 1 2020-12-23 07:16:44
6577 2005-07-12 06:15:05.000 4191 4191 439 439 2005-07-15 06:23:05.000 1 1 2020-12-23 07:16:53
6672 2005-07-12 11:49:16.000 375 375 439 439 2005-07-13 07:03:16.000 2 2 2020-12-23 07:16:55
8343 2005-07-29 04:45:16.000 4267 4267 439 439 2005-08-02 03:37:16.000 1 1 2020-12-23 07:17:20
8624 2005-07-29 13:55:36.000 4402 4402 439 439 2005-08-02 12:23:36.000 2 2 2020-12-23 07:17:24
8703 2005-07-29 17:12:44.000 1065 1065 439 439 2005-07-30 19:38:44.000 1 1 2020-12-23 07:17:25
9275 2005-07-30 15:09:15.000 1916 1916 439 439 2005-07-31 10:23:15.000 2 2 2020-12-23 07:17:33
9322 2005-07-30 17:21:39.000 223 223 439 439 2005-08-06 16:58:39.000 2 2 2020-12-23 07:17:34
10744 2005-08-01 19:56:49.000 565 565 439 439 2005-08-09 16:33:49.000 2 2 2020-12-23 07:17:54
10905 2005-08-02 01:45:59.000 2835 2835 439 439 2005-08-04 22:28:59.000 1 1 2020-12-23 07:17:56
11042 2005-08-02 06:04:33.000 4149 4149 439 439 2005-08-11 01:30:33.000 1 1 2020-12-23 07:17:58
11544 2005-08-17 00:55:07.000 836 836 439 439 2005-08-22 19:25:07.000 1 1 2020-12-23 07:18:05
11989 2005-08-17 18:23:58.000 3686 3686 439 439 2005-08-20 20:31:58.000 2 2 2020-12-23 07:18:11
12621 2005-08-18 17:31:36.000 4566 4566 439 439 2005-08-24 16:43:36.000 2 2 2020-12-23 07:18:20
12755 2005-08-18 22:38:47.000 105 105 439 439 2005-08-22 23:58:47.000 1 1 2020-12-23 07:18:22
12826 2005-08-19 01:25:11.000 1277 1277 439 439 2005-08-27 01:22:11.000 1 1 2020-12-23 07:18:22
13358 2005-08-19 21:04:20.000 1510 1510 439 439 2005-08-24 20:49:20.000 2 2 2020-12-23 07:18:31
14730 2005-08-21 22:21:11.000 2949 2949 439 439 2005-08-30 03:02:11.000 1 1 2020-12-23 07:18:51
15044 2005-08-22 09:51:54.000 4513 4513 439 439 2005-08-31 12:45:54.000 1 1 2020-12-23 07:18:55
15162 2005-08-22 14:41:05.000 1756 1756 439 439 2005-08-27 20:23:05.000 2 2 2020-12-23 07:18:57
15653 2005-08-23 08:34:42.000 2736 2736 439 439 2005-09-01 03:07:42.000 1 1 2020-12-23 07:19:04
15818 2005-08-23 14:59:58.000 2620 2620 439 439 2005-08-27 13:13:58.000 2 2 2020-12-23 07:19:07
16018 2005-08-23 21:27:35.000 897 897 439 439 2005-08-30 00:36:35.000 1 1 2020-12-23 07:19:09

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