home / sakila

rental

33 rows where customer_id = 462

✎ 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
156 2005-05-26 01:19:05.000 3193 3193 462 462 2005-05-27 23:43:05.000 1 1 2020-12-23 07:15:22
590 2005-05-28 13:06:50.000 473 473 462 462 2005-06-02 09:18:50.000 1 1 2020-12-23 07:15:27
1773 2005-06-16 18:13:43.000 4396 4396 462 462 2005-06-24 17:43:43.000 2 2 2020-12-23 07:15:43
1926 2005-06-17 06:24:30.000 3509 3509 462 462 2005-06-25 03:39:30.000 2 2 2020-12-23 07:15:46
3279 2005-06-21 06:05:53.000 1672 1672 462 462 2005-06-25 09:40:53.000 1 1 2020-12-23 07:16:05
4500 2005-07-08 02:10:01.000 398 398 462 462 2005-07-15 05:49:01.000 2 2 2020-12-23 07:16:23
4728 2005-07-08 12:59:01.000 3687 3687 462 462 2005-07-13 13:00:01.000 1 1 2020-12-23 07:16:27
6583 2005-07-12 06:42:31.000 2343 2343 462 462 2005-07-15 07:51:31.000 1 1 2020-12-23 07:16:53
6630 2005-07-12 09:30:05.000 1843 1843 462 462 2005-07-14 08:29:05.000 2 2 2020-12-23 07:16:54
6710 2005-07-12 13:23:09.000 806 806 462 462 2005-07-20 10:10:09.000 2 2 2020-12-23 07:16:55
6721 2005-07-12 13:42:58.000 2798 2798 462 462 2005-07-19 16:39:58.000 2 2 2020-12-23 07:16:55
7295 2005-07-27 12:38:47.000 3396 3396 462 462 2005-08-05 10:12:47.000 1 1 2020-12-23 07:17:04
7324 2005-07-27 13:42:39.000 2572 2572 462 462 2005-08-04 10:33:39.000 2 2 2020-12-23 07:17:05
7762 2005-07-28 06:34:23.000 3234 3234 462 462 2005-08-05 09:55:23.000 2 2 2020-12-23 07:17:11
7932 2005-07-28 12:24:54.000 3738 3738 462 462 2005-07-30 11:33:54.000 1 1 2020-12-23 07:17:13
7935 2005-07-28 12:33:17.000 3664 3664 462 462 2005-08-04 14:40:17.000 2 2 2020-12-23 07:17:13
8066 2005-07-28 17:20:09.000 3208 3208 462 462 2005-07-31 18:36:09.000 2 2 2020-12-23 07:17:15
8282 2005-07-29 01:49:04.000 980 980 462 462 2005-08-05 01:51:04.000 2 2 2020-12-23 07:17:19
8290 2005-07-29 02:24:08.000 3823 3823 462 462 2005-08-03 01:02:08.000 2 2 2020-12-23 07:17:19
8757 2005-07-29 19:19:10.000 3473 3473 462 462 2005-08-02 13:47:10.000 2 2 2020-12-23 07:17:26
9891 2005-07-31 14:05:44.000 3359 3359 462 462 2005-08-02 16:21:44.000 2 2 2020-12-23 07:17:42
10283 2005-08-01 03:29:45.000 4237 4237 462 462 2005-08-07 04:19:45.000 1 1 2020-12-23 07:17:47
11639 2005-08-17 04:43:29.000 3985 3985 462 462 2005-08-25 01:04:29.000 2 2 2020-12-23 07:18:07
11808 2005-08-17 11:51:16.000 4042 4042 462 462 2005-08-18 14:01:16.000 2 2 2020-12-23 07:18:09
12466 2005-08-18 11:36:55.000 2686 2686 462 462 2005-08-23 13:46:55.000 1 1 2020-12-23 07:18:18
12582 2005-08-18 15:51:12.000 4467 4467 462 462 2005-08-20 12:05:12.000 1 1 2020-12-23 07:18:19
12802 2005-08-19 00:27:41.000 2461 2461 462 462 2005-08-28 03:24:41.000 1 1 2020-12-23 07:18:22
13041 2005-08-19 09:05:38.000 1576 1576 462 462 2005-08-27 06:34:38.000 1 1 2020-12-23 07:18:26
13328 2005-08-19 19:56:01.000 605 605 462 462 2005-08-20 22:16:01.000 2 2 2020-12-23 07:18:30
13492 2005-08-20 01:32:04.000 1155 1155 462 462 2005-08-29 02:14:04.000 2 2 2020-12-23 07:18:33
15581 2005-08-23 05:42:13.000 4010 4010 462 462 2005-08-28 00:03:13.000 1 1 2020-12-23 07:19:03
15943 2005-08-23 18:49:32.000 706 706 462 462 2005-08-27 19:20:32.000 1 1 2020-12-23 07:19:08
16013 2005-08-23 21:17:17.000 561 561 462 462 2005-08-26 21:15:17.000 1 1 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 12.25ms