home / sakila

rental

30 rows where customer_id = 307

✎ 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
413 2005-05-27 14:45:37.000 3516 3516 307 307 2005-06-03 11:11:37.000 1 1 2020-12-23 07:15:25
535 2005-05-28 06:16:32.000 4209 4209 307 307 2005-05-31 02:48:32.000 1 1 2020-12-23 07:15:27
614 2005-05-28 15:33:28.000 280 280 307 307 2005-06-04 12:27:28.000 2 2 2020-12-23 07:15:28
970 2005-05-30 19:50:28.000 1520 1520 307 307 2005-06-09 01:19:28.000 1 1 2020-12-23 07:15:33
2152 2005-06-17 22:53:27.000 2665 2665 307 307 2005-06-23 19:19:27.000 1 1 2020-12-23 07:15:49
2167 2005-06-17 23:51:28.000 3796 3796 307 307 2005-06-21 00:43:28.000 2 2 2020-12-23 07:15:49
2787 2005-06-19 18:47:00.000 3371 3371 307 307 2005-06-22 20:22:00.000 2 2 2020-12-23 07:15:58
2881 2005-06-20 01:26:18.000 1391 1391 307 307 2005-06-26 23:42:18.000 1 1 2020-12-23 07:15:59
3057 2005-06-20 13:22:48.000 1101 1101 307 307 2005-06-26 17:22:48.000 2 2 2020-12-23 07:16:01
3209 2005-06-21 00:51:06.000 287 287 307 307 2005-06-22 21:49:06.000 2 2 2020-12-23 07:16:04
3962 2005-07-06 22:13:45.000 379 379 307 307 2005-07-15 00:22:45.000 2 2 2020-12-23 07:16:15
3985 2005-07-06 23:24:03.000 2096 2096 307 307 2005-07-10 00:20:03.000 2 2 2020-12-23 07:16:15
4522 2005-07-08 03:03:12.000 4114 4114 307 307 2005-07-10 04:49:12.000 1 1 2020-12-23 07:16:23
4868 2005-07-08 19:13:50.000 1157 1157 307 307 2005-07-14 20:59:50.000 2 2 2020-12-23 07:16:29
5871 2005-07-10 18:46:08.000 3288 3288 307 307 2005-07-16 17:32:08.000 1 1 2020-12-23 07:16:43
6125 2005-07-11 08:03:35.000 2439 2439 307 307 2005-07-18 12:46:35.000 1 1 2020-12-23 07:16:47
6256 2005-07-11 15:19:22.000 480 480 307 307 2005-07-13 12:43:22.000 1 1 2020-12-23 07:16:48
6991 2005-07-27 01:03:06.000 319 319 307 307 2005-08-05 04:18:06.000 2 2 2020-12-23 07:16:59
7536 2005-07-27 21:34:09.000 3417 3417 307 307 2005-08-02 03:26:09.000 1 1 2020-12-23 07:17:08
7760 2005-07-28 06:29:45.000 409 409 307 307 2005-08-03 01:36:45.000 1 1 2020-12-23 07:17:11
7929 2005-07-28 12:16:40.000 2652 2652 307 307 2005-07-31 13:09:40.000 2 2 2020-12-23 07:17:13
8647 2005-07-29 14:52:59.000 556 556 307 307 2005-08-06 11:09:59.000 2 2 2020-12-23 07:17:24
10135 2005-07-31 21:57:32.000 4193 4193 307 307 2005-08-05 22:23:32.000 1 1 2020-12-23 07:17:46
10374 2005-08-01 06:25:27.000 4351 4351 307 307 2005-08-07 05:44:27.000 2 2 2020-12-23 07:17:49
10745 2005-08-01 19:57:06.000 446 446 307 307 2005-08-07 18:04:06.000 1 1 2020-12-23 07:17:54
11491 2005-08-02 22:44:50.000 268 268 307 307 2005-08-11 01:55:50.000 2 2 2020-12-23 07:18:05
12391 2005-08-18 08:52:53.000 1507 1507 307 307 2005-08-22 12:15:53.000 2 2 2020-12-23 07:18:17
13365 2005-08-19 21:12:37.000 4136 4136 307 307 2005-08-25 19:56:37.000 2 2 2020-12-23 07:18:31
14231 2005-08-21 05:04:34.000 1244 1244 307 307 2005-08-23 04:58:34.000 1 1 2020-12-23 07:18:44
15515 2005-08-23 03:03:53.000 3940 3940 307 307 2005-08-25 08:27:53.000 2 2 2020-12-23 07:19:02

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