home / sakila

rental

30 rows where customer_id = 595

✎ 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
613 2005-05-28 15:27:22.000 270 270 595 595 2005-06-02 20:01:22.000 1 1 2020-12-23 07:15:28
1170 2005-06-14 23:47:35.000 2444 2444 595 595 2005-06-17 05:28:35.000 2 2 2020-12-23 07:15:35
3371 2005-06-21 13:27:22.000 2526 2526 595 595 2005-06-29 14:04:22.000 2 2 2020-12-23 07:16:06
3789 2005-07-06 14:02:26.000 3560 3560 595 595 2005-07-14 18:13:26.000 1 1 2020-12-23 07:16:12
4017 2005-07-07 01:08:18.000 3117 3117 595 595 2005-07-09 01:47:18.000 2 2 2020-12-23 07:16:16
4241 2005-07-07 13:39:00.000 4154 4154 595 595 2005-07-12 17:49:00.000 2 2 2020-12-23 07:16:19
4775 2005-07-08 15:44:05.000 4277 4277 595 595 2005-07-11 20:39:05.000 2 2 2020-12-23 07:16:27
5631 2005-07-10 06:15:45.000 2095 2095 595 595 2005-07-17 09:53:45.000 2 2 2020-12-23 07:16:40
5952 2005-07-10 23:18:20.000 3406 3406 595 595 2005-07-16 17:42:20.000 1 1 2020-12-23 07:16:45
6105 2005-07-11 07:03:19.000 3501 3501 595 595 2005-07-19 06:46:19.000 1 1 2020-12-23 07:16:47
6704 2005-07-12 12:50:24.000 1590 1590 595 595 2005-07-20 16:41:24.000 2 2 2020-12-23 07:16:55
7086 2005-07-27 04:39:46.000 2938 2938 595 595 2005-08-05 00:32:46.000 2 2 2020-12-23 07:17:01
7307 2005-07-27 12:59:10.000 3882 3882 595 595 2005-07-29 11:35:10.000 1 1 2020-12-23 07:17:04
7396 2005-07-27 16:03:53.000 3346 3346 595 595 2005-08-05 10:36:53.000 2 2 2020-12-23 07:17:06
7490 2005-07-27 19:48:12.000 4503 4503 595 595 2005-08-04 17:15:12.000 1 1 2020-12-23 07:17:07
9152 2005-07-30 10:51:27.000 3607 3607 595 595 2005-07-31 06:38:27.000 2 2 2020-12-23 07:17:31
9223 2005-07-30 13:23:20.000 3231 3231 595 595 2005-08-04 11:24:20.000 1 1 2020-12-23 07:17:33
9354 2005-07-30 18:32:51.000 510 510 595 595 2005-08-02 21:28:51.000 2 2 2020-12-23 07:17:34
9497 2005-07-30 23:56:54.000 933 933 595 595 2005-08-04 19:52:54.000 1 1 2020-12-23 07:17:36
9542 2005-07-31 01:41:48.000 2243 2243 595 595 2005-08-01 00:49:48.000 2 2 2020-12-23 07:17:37
9631 2005-07-31 05:02:00.000 321 321 595 595 2005-08-02 02:04:00.000 2 2 2020-12-23 07:17:38
9826 2005-07-31 11:51:46.000 2649 2649 595 595 2005-08-09 17:18:46.000 1 1 2020-12-23 07:17:41
10729 2005-08-01 19:21:11.000 2918 2918 595 595 2005-08-07 21:20:11.000 2 2 2020-12-23 07:17:54
10932 2005-08-02 02:46:22.000 1688 1688 595 595 2005-08-06 01:49:22.000 2 2 2020-12-23 07:17:57
11748 2005-08-17 09:04:02.000 1175 1175 595 595 2005-08-21 12:22:02.000 2 2 2020-12-23 07:18:08
12235 2005-08-18 03:17:50.000 957 957 595 595 2005-08-20 02:49:50.000 1 1 2020-12-23 07:18:14
14334 2005-08-21 08:32:32.000 1448 1448 595 595 2005-08-25 02:53:32.000 2 2 2020-12-23 07:18:45
15576 2005-08-23 05:32:03.000 3257 3257 595 595 2005-08-26 02:31:03.000 1 1 2020-12-23 07:19:03
15994 2005-08-23 20:29:10.000 438 438 595 595 2005-08-28 01:41:10.000 2 2 2020-12-23 07:19:09
16016 2005-08-23 21:26:35.000 3374 3374 595 595 2005-08-28 16:06:35.000 2 2 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 11.429ms