home / sakila

rental

28 rows where customer_id = 500

✎ 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
112 2005-05-25 18:57:24.000 2153 2153 500 500 2005-06-02 20:44:24.000 1 1 2020-12-23 07:15:21
389 2005-05-27 10:45:41.000 691 691 500 500 2005-06-05 06:22:41.000 2 2 2020-12-23 07:15:25
610 2005-05-28 15:15:25.000 3642 3642 500 500 2005-06-02 12:30:25.000 2 2 2020-12-23 07:15:28
1375 2005-06-15 14:54:56.000 3555 3555 500 500 2005-06-21 14:48:56.000 2 2 2020-12-23 07:15:38
1388 2005-06-15 15:48:41.000 3987 3987 500 500 2005-06-22 17:51:41.000 1 1 2020-12-23 07:15:38
2189 2005-06-18 01:20:26.000 249 249 500 500 2005-06-25 00:30:26.000 1 1 2020-12-23 07:15:50
2526 2005-06-19 01:03:07.000 3309 3309 500 500 2005-06-28 06:57:07.000 1 1 2020-12-23 07:15:54
2996 2005-06-20 09:20:29.000 4064 4064 500 500 2005-06-27 09:18:29.000 1 1 2020-12-23 07:16:01
3926 2005-07-06 20:42:35.000 4241 4241 500 500 2005-07-09 16:30:35.000 2 2 2020-12-23 07:16:14
4561 2005-07-08 05:02:43.000 1643 1643 500 500 2005-07-11 04:56:43.000 1 1 2020-12-23 07:16:24
4790 2005-07-08 16:25:27.000 100 100 500 500 2005-07-11 11:35:27.000 1 1 2020-12-23 07:16:27
6018 2005-07-11 02:06:36.000 4555 4555 500 500 2005-07-12 02:16:36.000 2 2 2020-12-23 07:16:45
6187 2005-07-11 11:28:51.000 3344 3344 500 500 2005-07-12 15:44:51.000 1 1 2020-12-23 07:16:47
6801 2005-07-12 17:09:08.000 872 872 500 500 2005-07-21 22:25:08.000 1 1 2020-12-23 07:16:57
7857 2005-07-28 09:49:40.000 4027 4027 500 500 2005-08-01 05:34:40.000 2 2 2020-12-23 07:17:12
7925 2005-07-28 12:10:02.000 1763 1763 500 500 2005-08-02 15:50:02.000 1 1 2020-12-23 07:17:13
8538 2005-07-29 10:45:17.000 3768 3768 500 500 2005-08-04 15:12:17.000 1 1 2020-12-23 07:17:22
8925 2005-07-30 02:09:14.000 3753 3753 500 500 2005-07-30 21:39:14.000 1 1 2020-12-23 07:17:28
9290 2005-07-30 15:59:08.000 2275 2275 500 500 2005-08-06 21:49:08.000 2 2 2020-12-23 07:17:33
10947 2005-08-02 03:23:17.000 2510 2510 500 500 2005-08-07 05:25:17.000 1 1 2020-12-23 07:17:57
11218 2005-08-02 12:29:12.000 1126 1126 500 500 2005-08-10 16:13:12.000 2 2 2020-12-23 07:18:00
12639 2005-08-18 18:13:05.000 562 562 500 500 2005-08-27 16:00:05.000 2 2 2020-12-23 07:18:20
12813 2005-08-19 00:54:22.000 3285 3285 500 500 2005-08-19 21:17:22.000 2 2 2020-12-23 07:18:22
13628 2005-08-20 07:03:53.000 1006 1006 500 500 2005-08-22 11:27:53.000 2 2 2020-12-23 07:18:35
14407 2005-08-21 10:46:51.000 2403 2403 500 500 2005-08-25 09:28:51.000 2 2 2020-12-23 07:18:46
14964 2005-08-22 06:39:24.000 2302 2302 500 500 2005-08-26 06:05:24.000 1 1 2020-12-23 07:18:54
15584 2005-08-23 05:49:21.000 3526 3526 500 500 2005-08-27 04:49:21.000 1 1 2020-12-23 07:19:03
15853 2005-08-23 15:54:20.000 225 225 500 500 2005-08-24 18:53:20.000 2 2 2020-12-23 07:19:07

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