home / sakila

rental

28 rows where customer_id = 132

✎ 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
1843 2005-06-16 23:53:42.000 2714 2714 132 132 2005-06-22 18:33:42.000 2 2 2020-12-23 07:15:44
2208 2005-06-18 02:22:07.000 2345 2345 132 132 2005-06-23 07:24:07.000 2 2 2020-12-23 07:15:50
2384 2005-06-18 15:18:49.000 3378 3378 132 132 2005-06-21 18:10:49.000 1 1 2020-12-23 07:15:52
2608 2005-06-19 07:10:36.000 1618 1618 132 132 2005-06-24 13:09:36.000 1 1 2020-12-23 07:15:55
2924 2005-06-20 04:20:14.000 580 580 132 132 2005-06-21 01:13:14.000 1 1 2020-12-23 07:16:00
3121 2005-06-20 18:23:30.000 797 797 132 132 2005-06-21 20:36:30.000 1 1 2020-12-23 07:16:02
3706 2005-07-06 10:18:01.000 681 681 132 132 2005-07-09 09:07:01.000 2 2 2020-12-23 07:16:11
3825 2005-07-06 15:50:03.000 630 630 132 132 2005-07-09 19:20:03.000 1 1 2020-12-23 07:16:13
4168 2005-07-07 09:37:24.000 1872 1872 132 132 2005-07-09 14:32:24.000 2 2 2020-12-23 07:16:18
4534 2005-07-08 03:36:55.000 2518 2518 132 132 2005-07-16 00:49:55.000 2 2 2020-12-23 07:16:24
4557 2005-07-08 04:49:15.000 1191 1191 132 132 2005-07-14 00:00:15.000 2 2 2020-12-23 07:16:24
4903 2005-07-08 20:50:05.000 1769 1769 132 132 2005-07-13 15:27:05.000 1 1 2020-12-23 07:16:29
5391 2005-07-09 19:28:34.000 402 402 132 132 2005-07-18 01:07:34.000 1 1 2020-12-23 07:16:36
5684 2005-07-10 08:59:03.000 99 99 132 132 2005-07-15 07:21:03.000 1 1 2020-12-23 07:16:41
5703 2005-07-10 10:04:15.000 1585 1585 132 132 2005-07-16 07:43:15.000 1 1 2020-12-23 07:16:41
5715 2005-07-10 10:48:03.000 1638 1638 132 132 2005-07-18 11:27:03.000 1 1 2020-12-23 07:16:41
6239 2005-07-11 14:20:48.000 4107 4107 132 132 2005-07-17 13:41:48.000 2 2 2020-12-23 07:16:48
6978 2005-07-27 00:47:40.000 3645 3645 132 132 2005-07-31 04:32:40.000 2 2 2020-12-23 07:16:59
7432 2005-07-27 17:31:40.000 3169 3169 132 132 2005-07-28 17:44:40.000 2 2 2020-12-23 07:17:06
7631 2005-07-28 01:01:15.000 2437 2437 132 132 2005-08-01 06:16:15.000 2 2 2020-12-23 07:17:09
10243 2005-08-01 02:18:46.000 2236 2236 132 132 2005-08-06 21:45:46.000 1 1 2020-12-23 07:17:47
10400 2005-08-01 07:18:24.000 3897 3897 132 132 2005-08-10 08:38:24.000 1 1 2020-12-23 07:17:49
10619 2005-08-01 15:07:04.000 2189 2189 132 132 2005-08-07 11:42:04.000 2 2 2020-12-23 07:17:53
10638 2005-08-01 15:44:20.000 2239 2239 132 132 2005-08-08 16:05:20.000 2 2 2020-12-23 07:17:53
11140 2005-08-02 09:27:45.000 3836 3836 132 132 2005-08-05 04:10:45.000 1 1 2020-12-23 07:17:59
11812 2005-08-17 12:00:54.000 119 119 132 132 2005-08-18 16:08:54.000 1 1 2020-12-23 07:18:09
12133 2005-08-17 23:47:16.000 1958 1958 132 132 2005-08-19 03:46:16.000 2 2 2020-12-23 07:18:13
15874 2005-08-23 16:30:55.000 621 621 132 132 2005-08-28 20:57:55.000 1 1 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 18.837ms