home / sakila

rental

20 rows where customer_id = 272

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
33 2005-05-25 04:18:51.000 1681 1681 272 272 2005-05-27 03:58:51.000 1 1 2020-12-23 07:15:20
405 2005-05-27 13:32:39.000 4090 4090 272 272 2005-06-05 18:53:39.000 2 2 2020-12-23 07:15:25
1041 2005-05-31 05:46:23.000 4432 4432 272 272 2005-06-06 09:50:23.000 2 2 2020-12-23 07:15:33
1072 2005-05-31 09:52:50.000 2557 2557 272 272 2005-06-05 05:39:50.000 1 1 2020-12-23 07:15:34
1604 2005-06-16 06:14:25.000 3226 3226 272 272 2005-06-17 03:53:25.000 2 2 2020-12-23 07:15:41
2546 2005-06-19 02:39:39.000 971 971 272 272 2005-06-23 03:56:39.000 2 2 2020-12-23 07:15:55
3323 2005-06-21 08:45:33.000 2252 2252 272 272 2005-06-28 08:17:33.000 2 2 2020-12-23 07:16:05
5047 2005-07-09 03:44:15.000 230 230 272 272 2005-07-15 09:07:15.000 2 2 2020-12-23 07:16:31
5158 2005-07-09 08:53:09.000 2825 2825 272 272 2005-07-10 11:05:09.000 1 1 2020-12-23 07:16:33
7300 2005-07-27 12:50:17.000 4561 4561 272 272 2005-08-04 18:43:17.000 1 1 2020-12-23 07:17:04
7658 2005-07-28 02:09:12.000 1798 1798 272 272 2005-07-30 00:54:12.000 2 2 2020-12-23 07:17:10
8248 2005-07-29 00:41:56.000 2017 2017 272 272 2005-08-05 18:53:56.000 2 2 2020-12-23 07:17:18
9787 2005-07-31 10:26:19.000 3559 3559 272 272 2005-08-09 09:02:19.000 1 1 2020-12-23 07:17:41
10736 2005-08-01 19:30:21.000 2227 2227 272 272 2005-08-02 22:37:21.000 1 1 2020-12-23 07:17:54
11003 2005-08-02 05:03:05.000 4301 4301 272 272 2005-08-05 10:48:05.000 2 2 2020-12-23 07:17:58
11597 2005-08-17 03:02:56.000 4073 4073 272 272 2005-08-26 04:47:56.000 1 1 2020-12-23 07:18:06
11881 2005-08-17 14:31:56.000 3124 3124 272 272 2005-08-21 11:05:56.000 1 1 2020-12-23 07:18:10
12006 2005-08-17 19:09:12.000 4072 4072 272 272 2005-08-24 13:50:12.000 1 1 2020-12-23 07:18:11
13274 2005-08-19 17:50:03.000 704 704 272 272 2005-08-20 14:39:03.000 2 2 2020-12-23 07:18:29
13903 2005-08-20 16:07:55.000 1676 1676 272 272 2005-08-25 18:26:55.000 1 1 2020-12-23 07:18:39

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