home / sakila

rental

27 rows where customer_id = 498

✎ 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
49 2005-05-25 06:39:35.000 2965 2965 498 498 2005-05-30 10:12:35.000 2 2 2020-12-23 07:15:20
429 2005-05-27 16:21:26.000 129 129 498 498 2005-06-05 20:23:26.000 2 2 2020-12-23 07:15:25
718 2005-05-29 04:52:23.000 1736 1736 498 498 2005-06-02 02:27:23.000 1 1 2020-12-23 07:15:29
1253 2005-06-15 06:06:33.000 3242 3242 498 498 2005-06-21 04:13:33.000 2 2 2020-12-23 07:15:36
1782 2005-06-16 19:21:12.000 1820 1820 498 498 2005-06-22 16:03:12.000 2 2 2020-12-23 07:15:43
2344 2005-06-18 12:01:47.000 2015 2015 498 498 2005-06-19 11:56:47.000 2 2 2020-12-23 07:15:52
2449 2005-06-18 19:18:36.000 3630 3630 498 498 2005-06-27 23:49:36.000 1 1 2020-12-23 07:15:53
3098 2005-06-20 16:37:01.000 3409 3409 498 498 2005-06-22 22:24:01.000 1 1 2020-12-23 07:16:02
3360 2005-06-21 12:12:41.000 2792 2792 498 498 2005-06-26 06:32:41.000 1 1 2020-12-23 07:16:06
3828 2005-07-06 15:57:30.000 4493 4493 498 498 2005-07-10 12:17:30.000 2 2 2020-12-23 07:16:13
3856 2005-07-06 17:04:46.000 3083 3083 498 498 2005-07-14 19:23:46.000 2 2 2020-12-23 07:16:13
4311 2005-07-07 17:31:14.000 2985 2985 498 498 2005-07-11 19:21:14.000 2 2 2020-12-23 07:16:20
4972 2005-07-08 23:56:09.000 2451 2451 498 498 2005-07-16 19:15:09.000 1 1 2020-12-23 07:16:30
5286 2005-07-09 15:11:41.000 483 483 498 498 2005-07-10 19:19:41.000 2 2 2020-12-23 07:16:35
5884 2005-07-10 19:31:38.000 916 916 498 498 2005-07-11 20:30:38.000 1 1 2020-12-23 07:16:44
6058 2005-07-11 04:03:51.000 3761 3761 498 498 2005-07-14 03:52:51.000 1 1 2020-12-23 07:16:46
6088 2005-07-11 05:40:35.000 3796 3796 498 498 2005-07-17 07:14:35.000 2 2 2020-12-23 07:16:46
7285 2005-07-27 12:14:06.000 2855 2855 498 498 2005-08-03 14:57:06.000 2 2 2020-12-23 07:17:04
7286 2005-07-27 12:23:49.000 3452 3452 498 498 2005-08-04 07:57:49.000 1 1 2020-12-23 07:17:04
7341 2005-07-27 14:23:55.000 3567 3567 498 498 2005-07-28 14:11:55.000 2 2 2020-12-23 07:17:05
8020 2005-07-28 15:43:32.000 4459 4459 498 498 2005-08-05 12:19:32.000 1 1 2020-12-23 07:17:15
8229 2005-07-29 00:09:08.000 4272 4272 498 498 2005-07-31 19:29:08.000 2 2 2020-12-23 07:17:18
9021 2005-07-30 05:34:24.000 674 674 498 498 2005-08-03 04:13:24.000 1 1 2020-12-23 07:17:29
9689 2005-07-31 07:00:08.000 819 819 498 498 2005-08-04 03:33:08.000 2 2 2020-12-23 07:17:39
10225 2005-08-01 01:38:40.000 3131 3131 498 498 2005-08-06 20:00:40.000 1 1 2020-12-23 07:17:47
11455 2005-08-02 21:07:06.000 2000 2000 498 498 2005-08-12 01:21:06.000 1 1 2020-12-23 07:18:04
12893 2005-08-19 03:46:43.000 168 168 498 498 2005-08-20 08:38:43.000 2 2 2020-12-23 07:18:24

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