home / sakila

rental

23 rows where customer_id = 106

✎ 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
552 2005-05-28 07:53:38.000 23 23 106 106 2005-06-04 12:45:38.000 2 2 2020-12-23 07:15:27
1156 2005-05-31 22:37:34.000 460 460 106 106 2005-06-01 23:02:34.000 2 2 2020-12-23 07:15:35
2295 2005-06-18 07:56:18.000 3250 3250 106 106 2005-06-21 07:10:18.000 1 1 2020-12-23 07:15:51
3023 2005-06-20 11:18:11.000 4304 4304 106 106 2005-06-21 12:43:11.000 1 1 2020-12-23 07:16:01
4229 2005-07-07 12:43:23.000 953 953 106 106 2005-07-13 15:00:23.000 2 2 2020-12-23 07:16:19
4277 2005-07-07 14:52:12.000 1983 1983 106 106 2005-07-09 13:10:12.000 1 1 2020-12-23 07:16:20
4665 2005-07-08 10:04:24.000 575 575 106 106 2005-07-14 15:13:24.000 1 1 2020-12-23 07:16:26
5453 2005-07-09 22:24:11.000 1780 1780 106 106 2005-07-19 04:08:11.000 1 1 2020-12-23 07:16:37
6992 2005-07-27 01:04:45.000 3411 3411 106 106 2005-07-28 02:34:45.000 2 2 2020-12-23 07:17:00
7224 2005-07-27 09:44:26.000 2701 2701 106 106 2005-08-05 12:46:26.000 2 2 2020-12-23 07:17:03
7483 2005-07-27 19:25:00.000 3678 3678 106 106 2005-07-29 21:19:00.000 2 2 2020-12-23 07:17:07
8115 2005-07-28 19:14:17.000 2080 2080 106 106 2005-08-03 14:58:17.000 2 2 2020-12-23 07:17:16
9072 2005-07-30 07:45:49.000 4536 4536 106 106 2005-08-04 10:00:49.000 1 1 2020-12-23 07:17:30
9747 2005-07-31 09:16:57.000 2455 2455 106 106 2005-08-08 06:47:57.000 2 2 2020-12-23 07:17:40
10213 2005-08-01 01:03:18.000 1462 1462 106 106 2005-08-09 20:07:18.000 1 1 2020-12-23 07:17:47
10228 2005-08-01 01:43:18.000 1742 1742 106 106 2005-08-06 22:10:18.000 2 2 2020-12-23 07:17:47
10444 2005-08-01 09:01:40.000 3242 3242 106 106 2005-08-09 11:31:40.000 1 1 2020-12-23 07:17:50
11436 2005-08-02 20:16:06.000 3834 3834 106 106 2005-08-05 20:40:06.000 2 2 2020-12-23 07:18:04
12159 2005-08-18 00:36:09.000 2243 2243 106 106 2005-08-27 06:31:09.000 1 1 2020-12-23 07:18:13
12845 2005-08-19 02:02:37.000 1698 1698 106 106 2005-08-22 01:08:37.000 1 1 2020-12-23 07:18:23
14431 2005-08-21 11:31:15.000 1572 1572 106 106 2005-08-26 11:22:15.000 2 2 2020-12-23 07:18:47
14920 2005-08-22 05:08:58.000 3357 3357 106 106 2005-08-23 02:51:58.000 1 1 2020-12-23 07:18:53
15154 2005-08-22 14:27:37.000 3395 3395 106 106 2005-08-29 20:04:37.000 2 2 2020-12-23 07:18:57

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