home / sakila

rental

24 rows where customer_id = 8

✎ 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
866 2005-05-30 03:43:54.000 2867 2867 8 8 2005-06-08 04:28:54.000 1 1 2020-12-23 07:15:31
1305 2005-06-15 09:59:16.000 187 187 8 8 2005-06-19 09:48:16.000 2 2 2020-12-23 07:15:37
2095 2005-06-17 18:21:35.000 1907 1907 8 8 2005-06-23 23:49:35.000 2 2 2020-12-23 07:15:48
3114 2005-06-20 17:57:47.000 2388 2388 8 8 2005-06-21 19:18:47.000 2 2 2020-12-23 07:16:02
3475 2005-07-05 23:01:21.000 2189 2189 8 8 2005-07-13 23:07:21.000 2 2 2020-12-23 07:16:07
4003 2005-07-07 00:09:02.000 4054 4054 8 8 2005-07-08 04:27:02.000 1 1 2020-12-23 07:16:15
4175 2005-07-07 10:02:03.000 1979 1979 8 8 2005-07-10 06:09:03.000 2 2 2020-12-23 07:16:18
4409 2005-07-07 21:47:29.000 3153 3153 8 8 2005-07-11 20:14:29.000 2 2 2020-12-23 07:16:22
4503 2005-07-08 02:17:12.000 1503 1503 8 8 2005-07-13 08:12:12.000 1 1 2020-12-23 07:16:23
5300 2005-07-09 15:40:46.000 2520 2520 8 8 2005-07-15 13:46:46.000 1 1 2020-12-23 07:16:35
5341 2005-07-09 17:13:23.000 2522 2522 8 8 2005-07-14 18:11:23.000 2 2 2020-12-23 07:16:35
6375 2005-07-11 21:39:46.000 1936 1936 8 8 2005-07-18 02:12:46.000 2 2 2020-12-23 07:16:50
6647 2005-07-12 10:43:53.000 1841 1841 8 8 2005-07-14 05:37:53.000 1 1 2020-12-23 07:16:54
8809 2005-07-29 21:42:49.000 3278 3278 8 8 2005-08-04 01:13:49.000 1 1 2020-12-23 07:17:26
9629 2005-07-31 04:54:43.000 2773 2773 8 8 2005-08-02 08:36:43.000 1 1 2020-12-23 07:17:38
10141 2005-07-31 22:08:29.000 8 8 8 8 2005-08-06 16:59:29.000 1 1 2020-12-23 07:17:46
10561 2005-08-01 13:05:35.000 2195 2195 8 8 2005-08-04 08:34:35.000 2 2 2020-12-23 07:17:52
11232 2005-08-02 13:04:12.000 971 971 8 8 2005-08-10 15:39:12.000 1 1 2020-12-23 07:18:01
11284 2005-08-02 14:42:45.000 172 172 8 8 2005-08-04 11:55:45.000 2 2 2020-12-23 07:18:01
12613 2005-08-18 17:16:01.000 3877 3877 8 8 2005-08-23 18:40:01.000 2 2 2020-12-23 07:18:19
14114 2005-08-21 01:07:11.000 2270 2270 8 8 2005-08-24 20:33:11.000 1 1 2020-12-23 07:18:42
15374 2005-08-22 22:09:09.000 4275 4275 8 8 2005-08-31 01:10:09.000 1 1 2020-12-23 07:19:00
15764 2005-08-23 13:05:10.000 2937 2937 8 8 2005-08-25 16:15:10.000 1 1 2020-12-23 07:19:06
15805 2005-08-23 14:31:19.000 4511 4511 8 8 2005-08-25 19:01:19.000 2 2 2020-12-23 07:19:06

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 10.397ms