home / sakila

rental

36 rows where customer_id = 380

✎ 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
847 2005-05-30 01:18:15.000 4387 4387 380 380 2005-06-06 20:20:15.000 2 2 2020-12-23 07:15:31
1868 2005-06-17 02:03:22.000 2412 2412 380 380 2005-06-25 04:38:22.000 1 1 2020-12-23 07:15:45
1984 2005-06-17 10:25:28.000 3417 3417 380 380 2005-06-23 08:18:28.000 2 2 2020-12-23 07:15:47
2018 2005-06-17 12:35:58.000 1278 1278 380 380 2005-06-26 13:16:58.000 2 2 2020-12-23 07:15:47
2440 2005-06-18 18:41:09.000 2866 2866 380 380 2005-06-22 12:46:09.000 1 1 2020-12-23 07:15:53
2464 2005-06-18 20:06:05.000 463 463 380 380 2005-06-20 19:22:05.000 1 1 2020-12-23 07:15:53
2998 2005-06-20 09:30:22.000 1288 1288 380 380 2005-06-24 06:31:22.000 2 2 2020-12-23 07:16:01
3099 2005-06-20 16:44:33.000 3756 3756 380 380 2005-06-27 12:17:33.000 2 2 2020-12-23 07:16:02
3260 2005-06-21 03:59:13.000 3627 3627 380 380 2005-06-23 03:29:13.000 1 1 2020-12-23 07:16:04
3637 2005-07-06 07:06:31.000 3823 3823 380 380 2005-07-10 02:11:31.000 2 2 2020-12-23 07:16:10
3688 2005-07-06 09:41:53.000 1102 1102 380 380 2005-07-14 10:30:53.000 2 2 2020-12-23 07:16:11
4675 2005-07-08 10:24:22.000 1309 1309 380 380 2005-07-14 11:09:22.000 1 1 2020-12-23 07:16:26
4706 2005-07-08 11:51:41.000 2512 2512 380 380 2005-07-17 12:58:41.000 1 1 2020-12-23 07:16:26
5339 2005-07-09 17:09:17.000 698 698 380 380 2005-07-10 21:07:17.000 2 2 2020-12-23 07:16:35
7021 2005-07-27 02:26:38.000 2690 2690 380 380 2005-08-05 01:18:38.000 1 1 2020-12-23 07:17:00
7167 2005-07-27 07:37:26.000 238 238 380 380 2005-08-03 06:39:26.000 1 1 2020-12-23 07:17:02
7435 2005-07-27 17:38:44.000 1574 1574 380 380 2005-07-30 16:57:44.000 1 1 2020-12-23 07:17:06
7443 2005-07-27 17:47:43.000 703 703 380 380 2005-07-29 13:15:43.000 1 1 2020-12-23 07:17:06
7773 2005-07-28 07:02:17.000 4143 4143 380 380 2005-07-30 04:16:17.000 2 2 2020-12-23 07:17:11
7974 2005-07-28 14:11:57.000 2442 2442 380 380 2005-08-02 19:25:57.000 2 2 2020-12-23 07:17:14
9056 2005-07-30 07:13:20.000 4363 4363 380 380 2005-08-03 07:36:20.000 1 1 2020-12-23 07:17:30
9261 2005-07-30 14:39:35.000 372 372 380 380 2005-08-08 11:26:35.000 1 1 2020-12-23 07:17:33
9710 2005-07-31 08:05:31.000 3486 3486 380 380 2005-08-09 03:29:31.000 2 2 2020-12-23 07:17:40
10450 2005-08-01 09:10:03.000 234 234 380 380 2005-08-08 12:34:03.000 1 1 2020-12-23 07:17:50
10983 2005-08-02 04:24:23.000 4502 4502 380 380 2005-08-09 08:05:23.000 2 2 2020-12-23 07:17:57
11936 2005-08-17 16:45:34.000 1127 1127 380 380 2005-08-21 13:33:34.000 2 2 2020-12-23 07:18:10
11945 2005-08-17 17:05:33.000 1108 1108 380 380 2005-08-20 18:37:33.000 2 2 2020-12-23 07:18:11
12636 2005-08-18 18:00:29.000 1645 1645 380 380 2005-08-26 20:08:29.000 2 2 2020-12-23 07:18:20
12996 2005-08-19 07:31:32.000 4445 4445 380 380 2005-08-25 11:59:32.000 1 1 2020-12-23 07:18:25
14529 2005-08-21 15:08:31.000 1774 1774 380 380 2005-08-29 17:15:31.000 1 1 2020-12-23 07:18:48
14935 2005-08-22 05:47:31.000 2025 2025 380 380 2005-08-29 00:33:31.000 2 2 2020-12-23 07:18:54
15175 2005-08-22 15:29:15.000 4318 4318 380 380 2005-08-27 15:11:15.000 2 2 2020-12-23 07:18:57
15361 2005-08-22 21:39:45.000 1407 1407 380 380 2005-08-23 17:32:45.000 2 2 2020-12-23 07:19:00
15636 2005-08-23 07:50:46.000 1169 1169 380 380 2005-08-26 07:59:46.000 2 2 2020-12-23 07:19:04
15697 2005-08-23 10:04:36.000 1987 1987 380 380 2005-08-24 05:00:36.000 2 2 2020-12-23 07:19:05
15748 2005-08-23 12:33:00.000 2757 2757 380 380 2005-08-25 15:15:00.000 2 2 2020-12-23 07:19:06

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