home / sakila

rental

26 rows where customer_id = 298

✎ 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
383 2005-05-27 10:12:20.000 955 955 298 298 2005-06-03 10:37:20.000 1 1 2020-12-23 07:15:25
1454 2005-06-15 19:49:41.000 102 102 298 298 2005-06-17 15:17:41.000 2 2 2020-12-23 07:15:39
2385 2005-06-18 15:22:40.000 1641 1641 298 298 2005-06-26 10:02:40.000 1 1 2020-12-23 07:15:52
3095 2005-06-20 16:16:53.000 3937 3937 298 298 2005-06-22 10:35:53.000 2 2 2020-12-23 07:16:02
3400 2005-06-21 15:50:30.000 1697 1697 298 298 2005-06-25 18:07:30.000 1 1 2020-12-23 07:16:06
3479 2005-07-05 23:08:53.000 2277 2277 298 298 2005-07-11 21:42:53.000 1 1 2020-12-23 07:16:08
3728 2005-07-06 11:29:00.000 1798 1798 298 298 2005-07-11 06:28:00.000 1 1 2020-12-23 07:16:11
4291 2005-07-07 15:47:47.000 2074 2074 298 298 2005-07-10 11:45:47.000 1 1 2020-12-23 07:16:20
4936 2005-07-08 22:24:50.000 2033 2033 298 298 2005-07-15 03:14:50.000 2 2 2020-12-23 07:16:30
5166 2005-07-09 09:15:48.000 2771 2771 298 298 2005-07-16 06:04:48.000 1 1 2020-12-23 07:16:33
5247 2005-07-09 13:26:28.000 1186 1186 298 298 2005-07-12 14:00:28.000 2 2 2020-12-23 07:16:34
6802 2005-07-12 17:14:17.000 2942 2942 298 298 2005-07-17 11:54:17.000 2 2 2020-12-23 07:16:57
7802 2005-07-28 07:51:57.000 1108 1108 298 298 2005-07-29 09:32:57.000 1 1 2020-12-23 07:17:12
7869 2005-07-28 10:13:15.000 3005 3005 298 298 2005-08-03 12:58:15.000 1 1 2020-12-23 07:17:13
8737 2005-07-29 18:32:13.000 4154 4154 298 298 2005-08-05 21:07:13.000 2 2 2020-12-23 07:17:25
10248 2005-08-01 02:35:28.000 2146 2146 298 298 2005-08-08 02:24:28.000 2 2 2020-12-23 07:17:47
11070 2005-08-02 07:10:39.000 4020 4020 298 298 2005-08-03 07:43:39.000 1 1 2020-12-23 07:17:59
11288 2005-08-02 14:54:08.000 1478 1478 298 298 2005-08-11 12:22:08.000 1 1 2020-12-23 07:18:01
12076 2005-08-17 21:58:19.000 4278 4278 298 298 2005-08-20 22:10:19.000 1 1 2020-12-23 07:18:12
12765 2005-08-18 23:21:50.000 2244 2244 298 298 2005-08-28 04:42:50.000 2 2 2020-12-23 07:18:22
13172 2005-08-19 13:49:07.000 1301 1301 298 298 2005-08-20 19:39:07.000 2 2 2020-12-23 07:18:28
13244 2005-08-19 16:43:04.000 3246 3246 298 298 2005-08-22 15:21:04.000 2 2 2020-12-23 07:18:29
14473 2005-08-21 13:19:03.000 2747 2747 298 298 2005-08-23 15:12:03.000 1 1 2020-12-23 07:18:47
15245 2005-08-22 17:49:35.000 2545 2545 298 298 2005-08-26 18:25:35.000 2 2 2020-12-23 07:18:58
15262 2005-08-22 18:25:21.000 2534 2534 298 298 2005-08-28 22:19:21.000 1 1 2020-12-23 07:18:59
15643 2005-08-23 08:13:26.000 103 103 298 298 2005-08-25 05:18:26.000 2 2 2020-12-23 07:19:04

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