home / sakila

rental

20 rows where customer_id = 250

✎ 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
61 2005-05-25 09:01:57.000 4210 4210 250 250 2005-06-02 07:22:57.000 2 2 2020-12-23 07:15:21
176 2005-05-26 03:47:39.000 851 851 250 250 2005-06-01 02:36:39.000 2 2 2020-12-23 07:15:22
637 2005-05-28 18:14:29.000 1581 1581 250 250 2005-05-29 23:48:29.000 2 2 2020-12-23 07:15:28
687 2005-05-29 00:32:09.000 1731 1731 250 250 2005-05-31 23:53:09.000 1 1 2020-12-23 07:15:29
1146 2005-05-31 20:34:45.000 3134 3134 250 250 2005-06-03 18:12:45.000 2 2 2020-12-23 07:15:35
2432 2005-06-18 17:59:18.000 4420 4420 250 250 2005-06-25 15:19:18.000 2 2 2020-12-23 07:15:53
3635 2005-07-06 06:55:36.000 421 421 250 250 2005-07-09 07:57:36.000 2 2 2020-12-23 07:16:10
3951 2005-07-06 21:50:41.000 2288 2288 250 250 2005-07-12 02:09:41.000 2 2 2020-12-23 07:16:15
5479 2005-07-09 23:47:33.000 216 216 250 250 2005-07-13 01:09:33.000 1 1 2020-12-23 07:16:38
5540 2005-07-10 02:44:21.000 132 132 250 250 2005-07-11 07:13:21.000 1 1 2020-12-23 07:16:38
5998 2005-07-11 01:20:46.000 1458 1458 250 250 2005-07-15 21:41:46.000 1 1 2020-12-23 07:16:45
8579 2005-07-29 11:59:22.000 4045 4045 250 250 2005-07-30 11:41:22.000 2 2 2020-12-23 07:17:23
9099 2005-07-30 08:45:48.000 594 594 250 250 2005-08-01 03:18:48.000 2 2 2020-12-23 07:17:31
10604 2005-08-01 14:35:08.000 2833 2833 250 250 2005-08-08 10:19:08.000 2 2 2020-12-23 07:17:52
12361 2005-08-18 07:47:31.000 1418 1418 250 250 2005-08-22 12:08:31.000 2 2 2020-12-23 07:18:16
12810 2005-08-19 00:44:10.000 1340 1340 250 250 2005-08-22 22:30:10.000 2 2 2020-12-23 07:18:22
14565 2005-08-21 16:24:45.000 4160 4160 250 250 2005-08-25 14:42:45.000 1 1 2020-12-23 07:18:49
14587 2005-08-21 17:20:55.000 2329 2329 250 250 2005-08-26 17:17:55.000 1 1 2020-12-23 07:18:49
14814 2005-08-22 01:12:14.000 3109 3109 250 250 2005-08-27 23:24:14.000 2 2 2020-12-23 07:18:52
15247 2005-08-22 17:52:05.000 4572 4572 250 250 2005-08-31 21:37:05.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 13.083ms