home / sakila

rental

37 rows where customer_id = 257

✎ 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
139 2005-05-25 23:00:21.000 327 327 257 257 2005-05-29 17:12:21.000 1 1 2020-12-23 07:15:22
244 2005-05-26 13:40:40.000 1041 1041 257 257 2005-05-31 11:58:40.000 1 1 2020-12-23 07:15:23
705 2005-05-29 02:48:52.000 2809 2809 257 257 2005-05-30 06:21:52.000 1 1 2020-12-23 07:15:29
2557 2005-06-19 03:08:51.000 4546 4546 257 257 2005-06-20 07:59:51.000 1 1 2020-12-23 07:15:55
3083 2005-06-20 15:33:47.000 2896 2896 257 257 2005-06-26 16:14:47.000 2 2 2020-12-23 07:16:02
4462 2005-07-08 00:02:49.000 4120 4120 257 257 2005-07-15 20:48:49.000 2 2 2020-12-23 07:16:23
4574 2005-07-08 05:39:42.000 536 536 257 257 2005-07-08 23:44:42.000 2 2 2020-12-23 07:16:24
5495 2005-07-10 00:16:54.000 2199 2199 257 257 2005-07-19 01:22:54.000 2 2 2020-12-23 07:16:38
5858 2005-07-10 18:00:07.000 2913 2913 257 257 2005-07-11 20:01:07.000 2 2 2020-12-23 07:16:43
6422 2005-07-11 23:46:19.000 762 762 257 257 2005-07-20 22:12:19.000 1 1 2020-12-23 07:16:51
6711 2005-07-12 13:23:40.000 2247 2247 257 257 2005-07-20 11:45:40.000 2 2 2020-12-23 07:16:55
7007 2005-07-27 01:43:39.000 4186 4186 257 257 2005-07-31 21:04:39.000 1 1 2020-12-23 07:17:00
7176 2005-07-27 08:04:28.000 227 227 257 257 2005-07-29 14:00:28.000 2 2 2020-12-23 07:17:02
7496 2005-07-27 20:04:05.000 2449 2449 257 257 2005-08-02 20:12:05.000 1 1 2020-12-23 07:17:07
7510 2005-07-27 20:37:57.000 1617 1617 257 257 2005-08-01 17:14:57.000 2 2 2020-12-23 07:17:07
7518 2005-07-27 21:01:16.000 2676 2676 257 257 2005-08-03 15:26:16.000 1 1 2020-12-23 07:17:07
8156 2005-07-28 20:59:04.000 1977 1977 257 257 2005-08-01 01:52:04.000 1 1 2020-12-23 07:17:17
8252 2005-07-29 00:54:17.000 3312 3312 257 257 2005-07-31 20:34:17.000 1 1 2020-12-23 07:17:18
8344 2005-07-29 04:45:25.000 221 221 257 257 2005-08-06 01:53:25.000 1 1 2020-12-23 07:17:20
8640 2005-07-29 14:34:17.000 1874 1874 257 257 2005-08-01 13:09:17.000 2 2 2020-12-23 07:17:24
8946 2005-07-30 03:14:53.000 3510 3510 257 257 2005-08-04 00:50:53.000 1 1 2020-12-23 07:17:28
9800 2005-07-31 11:00:58.000 2153 2153 257 257 2005-08-02 10:13:58.000 2 2 2020-12-23 07:17:41
10142 2005-07-31 22:10:54.000 1839 1839 257 257 2005-08-09 19:04:54.000 2 2 2020-12-23 07:17:46
11230 2005-08-02 12:59:08.000 1463 1463 257 257 2005-08-04 13:42:08.000 1 1 2020-12-23 07:18:01
11394 2005-08-02 18:44:45.000 2087 2087 257 257 2005-08-06 22:51:45.000 2 2 2020-12-23 07:18:03
11545 2005-08-17 00:56:06.000 3198 3198 257 257 2005-08-25 22:47:06.000 1 1 2020-12-23 07:18:05
11860 2005-08-17 13:52:26.000 4354 4354 257 257 2005-08-24 14:47:26.000 1 1 2020-12-23 07:18:09
12841 2005-08-19 01:55:55.000 4233 4233 257 257 2005-08-24 02:56:55.000 1 1 2020-12-23 07:18:23
12904 2005-08-19 04:10:50.000 459 459 257 257 2005-08-27 23:24:50.000 1 1 2020-12-23 07:18:24
13203 2005-08-19 15:00:58.000 804 804 257 257 2005-08-27 15:38:58.000 2 2 2020-12-23 07:18:28
13218 2005-08-19 15:39:39.000 4148 4148 257 257 2005-08-22 17:28:39.000 1 1 2020-12-23 07:18:28
13389 2005-08-19 21:52:51.000 3352 3352 257 257 2005-08-25 02:38:51.000 1 1 2020-12-23 07:18:31
13846 2005-08-20 14:32:31.000 3289 3289 257 257 2005-08-28 16:58:31.000 1 1 2020-12-23 07:18:38
14115 2005-08-21 01:10:29.000 1945 1945 257 257 2005-08-24 01:21:29.000 1 1 2020-12-23 07:18:42
15025 2005-08-22 08:57:24.000 2107 2107 257 257 2005-08-24 06:09:24.000 2 2 2020-12-23 07:18:55
15967 2005-08-23 19:50:06.000 321 321 257 257 2005-08-29 14:51:06.000 1 1 2020-12-23 07:19:09
15968 2005-08-23 19:51:29.000 3598 3598 257 257 2005-08-24 15:07:29.000 1 1 2020-12-23 07:19:09

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