home / sakila

rental

29 rows where customer_id = 588

✎ 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
576 2005-05-28 10:56:10.000 1866 1866 588 588 2005-06-04 13:15:10.000 2 2 2020-12-23 07:15:27
961 2005-05-30 18:16:44.000 3293 3293 588 588 2005-06-04 23:40:44.000 2 2 2020-12-23 07:15:33
1885 2005-06-17 03:35:59.000 740 740 588 588 2005-06-21 05:57:59.000 2 2 2020-12-23 07:15:45
1903 2005-06-17 04:37:20.000 1939 1939 588 588 2005-06-26 09:05:20.000 2 2 2020-12-23 07:15:45
2270 2005-06-18 06:29:01.000 3447 3447 588 588 2005-06-26 07:21:01.000 2 2 2020-12-23 07:15:51
2453 2005-06-18 19:30:53.000 2562 2562 588 588 2005-06-20 17:22:53.000 1 1 2020-12-23 07:15:53
2920 2005-06-20 04:12:46.000 487 487 588 588 2005-06-26 23:34:46.000 2 2 2020-12-23 07:16:00
3628 2005-07-06 06:19:43.000 3509 3509 588 588 2005-07-07 02:23:43.000 1 1 2020-12-23 07:16:10
4101 2005-07-07 06:25:11.000 2891 2891 588 588 2005-07-12 07:44:11.000 2 2 2020-12-23 07:16:17
4207 2005-07-07 11:32:45.000 1119 1119 588 588 2005-07-14 05:49:45.000 2 2 2020-12-23 07:16:19
5203 2005-07-09 10:53:59.000 3661 3661 588 588 2005-07-15 09:45:59.000 2 2 2020-12-23 07:16:33
5335 2005-07-09 17:00:49.000 2353 2353 588 588 2005-07-12 12:21:49.000 2 2 2020-12-23 07:16:35
6368 2005-07-11 21:19:01.000 3666 3666 588 588 2005-07-13 17:56:01.000 2 2 2020-12-23 07:16:50
7377 2005-07-27 15:31:28.000 1369 1369 588 588 2005-08-02 19:59:28.000 2 2 2020-12-23 07:17:05
7903 2005-07-28 11:20:36.000 2767 2767 588 588 2005-07-31 09:16:36.000 1 1 2020-12-23 07:17:13
8421 2005-07-29 07:00:47.000 3399 3399 588 588 2005-08-02 08:03:47.000 2 2 2020-12-23 07:17:21
8429 2005-07-29 07:11:49.000 2456 2456 588 588 2005-07-31 02:45:49.000 1 1 2020-12-23 07:17:21
8519 2005-07-29 10:09:43.000 1163 1163 588 588 2005-08-03 08:14:43.000 2 2 2020-12-23 07:17:22
8769 2005-07-29 19:45:33.000 2180 2180 588 588 2005-08-05 22:09:33.000 2 2 2020-12-23 07:17:26
9326 2005-07-30 17:30:03.000 3772 3772 588 588 2005-08-01 13:41:03.000 2 2 2020-12-23 07:17:34
9370 2005-07-30 18:57:29.000 4433 4433 588 588 2005-08-01 21:35:29.000 2 2 2020-12-23 07:17:35
10373 2005-08-01 06:24:26.000 1754 1754 588 588 2005-08-02 12:07:26.000 1 1 2020-12-23 07:17:49
12185 2005-08-18 01:40:14.000 1558 1558 588 588 2005-08-25 05:04:14.000 1 1 2020-12-23 07:18:14
12815 2005-08-19 00:59:42.000 435 435 588 588 2005-08-25 21:43:42.000 2 2 2020-12-23 07:18:22
13064 2005-08-19 09:46:53.000 4131 4131 588 588 2005-08-21 08:29:53.000 1 1 2020-12-23 07:18:26
13923 2005-08-20 17:05:02.000 3129 3129 588 588 2005-08-27 11:22:02.000 2 2 2020-12-23 07:18:39
15109 2005-08-22 12:12:58.000 565 565 588 588 2005-08-30 07:20:58.000 1 1 2020-12-23 07:18:56
15158 2005-08-22 14:30:39.000 3614 3614 588 588 2005-08-27 15:55:39.000 1 1 2020-12-23 07:18:57
15209 2005-08-22 16:37:32.000 1620 1620 588 588 2005-08-25 19:04:32.000 1 1 2020-12-23 07:18:58

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