home / sakila

rental

25 rows where customer_id = 155

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: rental_date, 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
568 2005-05-28 09:57:36.000 2232 2232 155 155 2005-05-31 15:44:36.000 1 1 2020-12-23 07:15:27
1519 2005-06-15 23:55:27.000 1553 1553 155 155 2005-06-21 04:06:27.000 2 2 2020-12-23 07:15:40
1554 2005-06-16 02:16:47.000 715 715 155 155 2005-06-22 05:15:47.000 1 1 2020-12-23 07:15:40
2028 2005-06-17 13:08:08.000 4451 4451 155 155 2005-06-23 10:54:08.000 1 1 2020-12-23 07:15:47
2869 2005-06-20 00:09:25.000 1331 1331 155 155 2005-06-24 04:40:25.000 2 2 2020-12-23 07:15:59
3405 2005-06-21 15:58:25.000 2344 2344 155 155 2005-06-23 10:58:25.000 1 1 2020-12-23 07:16:06
5128 2005-07-09 07:25:54.000 3757 3757 155 155 2005-07-16 04:04:54.000 2 2 2020-12-23 07:16:32
6066 2005-07-11 04:32:42.000 1877 1877 155 155 2005-07-15 03:56:42.000 2 2 2020-12-23 07:16:46
6085 2005-07-11 05:24:36.000 312 312 155 155 2005-07-16 03:49:36.000 2 2 2020-12-23 07:16:46
6087 2005-07-11 05:29:22.000 198 198 155 155 2005-07-12 23:33:22.000 2 2 2020-12-23 07:16:46
6443 2005-07-12 00:35:51.000 895 895 155 155 2005-07-16 04:50:51.000 1 1 2020-12-23 07:16:51
7077 2005-07-27 04:13:02.000 3186 3186 155 155 2005-07-31 23:15:02.000 1 1 2020-12-23 07:17:01
7492 2005-07-27 19:54:18.000 908 908 155 155 2005-07-31 15:36:18.000 2 2 2020-12-23 07:17:07
7730 2005-07-28 04:59:48.000 3118 3118 155 155 2005-08-04 04:35:48.000 2 2 2020-12-23 07:17:11
9781 2005-07-31 10:13:02.000 2310 2310 155 155 2005-08-09 14:46:02.000 1 1 2020-12-23 07:17:41
10098 2005-07-31 20:41:17.000 1324 1324 155 155 2005-08-02 00:06:17.000 2 2 2020-12-23 07:17:45
11033 2005-08-02 05:54:17.000 3323 3323 155 155 2005-08-09 10:50:17.000 2 2 2020-12-23 07:17:58
11496 2006-02-14 15:16:03.000 2047 2047 155 155   1 1 2020-12-23 07:18:05
11951 2005-08-17 17:14:02.000 1394 1394 155 155 2005-08-26 12:04:02.000 2 2 2020-12-23 07:18:11
12352 2006-02-14 15:16:03.000 643 643 155 155   1 1 2020-12-23 07:18:16
14324 2005-08-21 08:10:56.000 1361 1361 155 155 2005-08-30 12:09:56.000 1 1 2020-12-23 07:18:45
14549 2005-08-21 15:54:21.000 4117 4117 155 155 2005-08-22 17:22:21.000 1 1 2020-12-23 07:18:48
14753 2005-08-21 23:11:43.000 1803 1803 155 155 2005-08-22 22:25:43.000 2 2 2020-12-23 07:18:51
14909 2005-08-22 04:48:44.000 1997 1997 155 155 2005-08-25 04:59:44.000 1 1 2020-12-23 07:18:53
15106 2005-08-22 12:01:48.000 399 399 155 155 2005-08-27 16:12:48.000 1 1 2020-12-23 07:18:56

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