home / sakila

rental

31 rows where customer_id = 340

✎ 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
1205 2005-06-15 02:25:56.000 470 470 340 340 2005-06-22 23:19:56.000 1 1 2020-12-23 07:15:36
1697 2005-06-16 12:55:20.000 1801 1801 340 340 2005-06-23 17:41:20.000 2 2 2020-12-23 07:15:42
2177 2005-06-18 00:34:45.000 492 492 340 340 2005-06-26 18:40:45.000 1 1 2020-12-23 07:15:49
2183 2005-06-18 01:06:01.000 1776 1776 340 340 2005-06-22 01:20:01.000 1 1 2020-12-23 07:15:49
2607 2005-06-19 06:55:01.000 3922 3922 340 340 2005-06-25 03:21:01.000 2 2 2020-12-23 07:15:55
2653 2005-06-19 10:36:53.000 3528 3528 340 340 2005-06-26 15:15:53.000 1 1 2020-12-23 07:15:56
3264 2005-06-21 04:19:03.000 1666 1666 340 340 2005-06-23 01:29:03.000 1 1 2020-12-23 07:16:04
3455 2005-06-21 21:17:51.000 4403 4403 340 340 2005-06-23 17:22:51.000 1 1 2020-12-23 07:16:07
4475 2005-07-08 00:27:30.000 3466 3466 340 340 2005-07-09 05:39:30.000 1 1 2020-12-23 07:16:23
4742 2005-07-08 13:35:23.000 3022 3022 340 340 2005-07-11 10:24:23.000 2 2 2020-12-23 07:16:27
6381 2005-07-11 21:58:48.000 2584 2584 340 340 2005-07-16 16:18:48.000 1 1 2020-12-23 07:16:50
7617 2005-07-28 00:18:40.000 2904 2904 340 340 2005-08-01 01:17:40.000 1 1 2020-12-23 07:17:09
8274 2005-07-29 01:34:32.000 2634 2634 340 340 2005-08-01 20:15:32.000 2 2 2020-12-23 07:17:18
8541 2005-07-29 10:55:01.000 976 976 340 340 2005-07-31 10:53:01.000 1 1 2020-12-23 07:17:23
8551 2005-07-29 11:13:11.000 2083 2083 340 340 2005-08-05 05:17:11.000 2 2 2020-12-23 07:17:23
8606 2005-07-29 13:14:24.000 4051 4051 340 340 2005-07-30 14:52:24.000 1 1 2020-12-23 07:17:23
9834 2005-07-31 12:05:42.000 2292 2292 340 340 2005-08-07 15:26:42.000 1 1 2020-12-23 07:17:41
10292 2005-08-01 03:42:40.000 2562 2562 340 340 2005-08-01 23:36:40.000 2 2 2020-12-23 07:17:48
10667 2005-08-01 16:58:22.000 3937 3937 340 340 2005-08-10 15:41:22.000 1 1 2020-12-23 07:17:53
10674 2005-08-01 17:11:52.000 1962 1962 340 340 2005-08-08 19:34:52.000 1 1 2020-12-23 07:17:53
10809 2005-08-01 22:39:27.000 1167 1167 340 340 2005-08-03 03:44:27.000 2 2 2020-12-23 07:17:55
10995 2005-08-02 04:48:00.000 2891 2891 340 340 2005-08-07 05:00:00.000 1 1 2020-12-23 07:17:57
12598 2005-08-18 16:34:03.000 3159 3159 340 340 2005-08-22 16:44:03.000 1 1 2020-12-23 07:18:19
12908 2005-08-19 04:19:05.000 175 175 340 340 2005-08-25 09:50:05.000 1 1 2020-12-23 07:18:24
12940 2005-08-19 05:38:29.000 2222 2222 340 340 2005-08-20 08:15:29.000 1 1 2020-12-23 07:18:24
13425 2005-08-19 23:11:44.000 2274 2274 340 340 2005-08-25 21:19:44.000 2 2 2020-12-23 07:18:32
14457 2005-08-21 12:47:38.000 4288 4288 340 340 2005-08-25 13:07:38.000 1 1 2020-12-23 07:18:47
14718 2005-08-21 21:39:25.000 3618 3618 340 340 2005-08-26 22:07:25.000 2 2 2020-12-23 07:18:51
14895 2005-08-22 04:19:23.000 4462 4462 340 340 2005-08-27 04:02:23.000 1 1 2020-12-23 07:18:53
15306 2005-08-22 19:46:36.000 521 521 340 340 2005-08-27 14:09:36.000 1 1 2020-12-23 07:18:59
15378 2005-08-22 22:25:17.000 1483 1483 340 340 2005-08-30 17:04:17.000 1 1 2020-12-23 07:19:00

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