home / sakila

rental

25 rows where customer_id = 456

✎ 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
19 2005-05-25 01:17:24.000 1941 1941 456 456 2005-05-31 06:00:24.000 1 1 2020-12-23 07:15:20
1288 2005-06-15 08:41:52.000 830 830 456 456 2005-06-19 05:30:52.000 2 2 2020-12-23 07:15:37
1700 2005-06-16 13:18:23.000 4251 4251 456 456 2005-06-21 16:46:23.000 2 2 2020-12-23 07:15:42
2103 2005-06-17 19:13:10.000 1469 1469 456 456 2005-06-21 21:32:10.000 2 2 2020-12-23 07:15:48
2146 2005-06-17 22:26:23.000 326 326 456 456 2005-06-26 17:10:23.000 1 1 2020-12-23 07:15:49
2192 2005-06-18 01:35:47.000 1886 1886 456 456 2005-06-23 23:38:47.000 2 2 2020-12-23 07:15:50
2404 2005-06-18 16:33:48.000 4138 4138 456 456 2005-06-23 20:39:48.000 2 2 2020-12-23 07:15:53
2581 2005-06-19 04:54:13.000 376 376 456 456 2005-06-23 23:28:13.000 2 2 2020-12-23 07:15:55
3743 2005-07-06 12:03:54.000 1012 1012 456 456 2005-07-13 10:56:54.000 2 2 2020-12-23 07:16:12
3881 2005-07-06 18:35:37.000 143 143 456 456 2005-07-10 00:06:37.000 2 2 2020-12-23 07:16:14
4141 2005-07-07 08:19:20.000 1904 1904 456 456 2005-07-11 06:54:20.000 1 1 2020-12-23 07:16:18
5964 2005-07-10 23:47:18.000 3981 3981 456 456 2005-07-12 03:55:18.000 2 2 2020-12-23 07:16:45
6023 2005-07-11 02:15:57.000 3794 3794 456 456 2005-07-15 21:30:57.000 2 2 2020-12-23 07:16:45
7248 2005-07-27 10:37:45.000 4256 4256 456 456 2005-08-01 13:13:45.000 1 1 2020-12-23 07:17:03
8749 2005-07-29 19:13:15.000 2252 2252 456 456 2005-08-01 15:02:15.000 1 1 2020-12-23 07:17:26
10519 2005-08-01 11:44:13.000 1967 1967 456 456 2005-08-09 16:57:13.000 1 1 2020-12-23 07:17:51
10813 2005-08-01 22:43:00.000 3580 3580 456 456 2005-08-03 21:43:00.000 1 1 2020-12-23 07:17:55
12188 2005-08-18 01:51:43.000 2989 2989 456 456 2005-08-18 22:23:43.000 1 1 2020-12-23 07:18:14
13144 2005-08-19 12:45:55.000 3766 3766 456 456 2005-08-27 10:37:55.000 2 2 2020-12-23 07:18:27
13348 2005-08-19 20:31:48.000 275 275 456 456 2005-08-21 21:01:48.000 1 1 2020-12-23 07:18:30
13547 2005-08-20 03:53:16.000 3122 3122 456 456 2005-08-25 04:02:16.000 1 1 2020-12-23 07:18:33
14253 2005-08-21 05:47:52.000 4246 4246 456 456 2005-08-25 04:28:52.000 1 1 2020-12-23 07:18:44
14690 2005-08-21 20:42:25.000 3649 3649 456 456 2005-08-29 18:42:25.000 2 2 2020-12-23 07:18:50
15720 2005-08-23 11:15:20.000 2490 2490 456 456 2005-08-31 09:49:20.000 1 1 2020-12-23 07:19:05
15910 2005-08-23 17:43:16.000 254 254 456 456 2005-08-24 21:55:16.000 2 2 2020-12-23 07:19:08

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