home / sakila

rental

27 rows where customer_id = 206

✎ 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
1872 2005-06-17 02:27:03.000 3596 3596 206 206 2005-06-20 22:41:03.000 2 2 2020-12-23 07:15:45
2477 2005-06-18 20:58:46.000 2510 2510 206 206 2005-06-22 21:49:46.000 1 1 2020-12-23 07:15:54
3012 2005-06-20 10:43:13.000 1392 1392 206 206 2005-06-28 10:07:13.000 2 2 2020-12-23 07:16:01
3533 2005-07-06 01:26:44.000 2028 2028 206 206 2005-07-14 21:37:44.000 1 1 2020-12-23 07:16:08
3831 2005-07-06 16:06:35.000 1338 1338 206 206 2005-07-08 15:14:35.000 2 2 2020-12-23 07:16:13
3847 2005-07-06 16:44:41.000 782 782 206 206 2005-07-07 21:54:41.000 2 2 2020-12-23 07:16:13
4068 2005-07-07 04:34:38.000 4152 4152 206 206 2005-07-11 09:16:38.000 2 2 2020-12-23 07:16:17
4107 2005-07-07 06:36:32.000 4232 4232 206 206 2005-07-14 03:36:32.000 1 1 2020-12-23 07:16:17
4823 2005-07-08 17:28:54.000 155 155 206 206 2005-07-11 23:10:54.000 1 1 2020-12-23 07:16:28
6139 2005-07-11 08:39:33.000 3065 3065 206 206 2005-07-17 08:00:33.000 2 2 2020-12-23 07:16:47
6420 2005-07-11 23:38:49.000 4443 4443 206 206 2005-07-17 17:46:49.000 2 2 2020-12-23 07:16:51
7222 2005-07-27 09:38:43.000 2330 2330 206 206 2005-07-28 06:25:43.000 1 1 2020-12-23 07:17:03
7541 2005-07-27 21:40:05.000 4100 4100 206 206 2005-07-29 16:13:05.000 1 1 2020-12-23 07:17:08
8217 2005-07-28 23:44:13.000 3747 3747 206 206 2005-08-03 21:27:13.000 2 2 2020-12-23 07:17:18
8549 2005-07-29 11:12:13.000 1866 1866 206 206 2005-08-06 06:04:13.000 2 2 2020-12-23 07:17:23
9474 2005-07-30 23:05:44.000 3771 3771 206 206 2005-08-05 23:46:44.000 1 1 2020-12-23 07:17:36
10930 2005-08-02 02:38:07.000 2027 2027 206 206 2005-08-08 05:15:07.000 2 2 2020-12-23 07:17:57
11022 2005-08-02 05:35:03.000 827 827 206 206 2005-08-09 10:20:03.000 2 2 2020-12-23 07:17:58
11634 2005-08-17 04:31:49.000 2576 2576 206 206 2005-08-21 02:51:49.000 1 1 2020-12-23 07:18:06
13128 2005-08-19 12:04:16.000 485 485 206 206 2005-08-26 16:06:16.000 2 2 2020-12-23 07:18:27
13232 2005-08-19 16:13:32.000 2370 2370 206 206 2005-08-28 14:42:32.000 2 2 2020-12-23 07:18:29
13263 2005-08-19 17:26:55.000 214 214 206 206 2005-08-28 20:07:55.000 2 2 2020-12-23 07:18:29
13550 2005-08-20 03:58:51.000 208 208 206 206 2005-08-28 00:45:51.000 2 2 2020-12-23 07:18:34
13696 2005-08-20 09:16:15.000 1279 1279 206 206 2005-08-21 03:33:15.000 1 1 2020-12-23 07:18:36
14695 2005-08-21 20:46:47.000 412 412 206 206 2005-08-22 22:25:47.000 2 2 2020-12-23 07:18:50
15686 2005-08-23 09:42:21.000 2041 2041 206 206 2005-08-29 12:22:21.000 1 1 2020-12-23 07:19:04
15709 2005-08-23 10:36:00.000 346 346 206 206 2005-08-28 06:18:00.000 2 2 2020-12-23 07:19:05

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