home / sakila

rental

25 rows where customer_id = 150

✎ 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
422 2005-05-27 15:31:55.000 1152 1152 150 150 2005-06-01 11:47:55.000 2 2 2020-12-23 07:15:25
609 2005-05-28 15:04:02.000 2944 2944 150 150 2005-06-05 14:47:02.000 2 2 2020-12-23 07:15:28
995 2005-05-31 00:06:02.000 17 17 150 150 2005-06-06 02:30:02.000 2 2 2020-12-23 07:15:33
3187 2005-06-20 23:06:07.000 4357 4357 150 150 2005-06-27 01:14:07.000 2 2 2020-12-23 07:16:03
3456 2005-06-21 21:19:47.000 1119 1119 150 150 2005-06-28 18:18:47.000 2 2 2020-12-23 07:16:07
4271 2005-07-07 14:38:52.000 533 533 150 150 2005-07-15 12:05:52.000 1 1 2020-12-23 07:16:20
6633 2005-07-12 09:35:42.000 2908 2908 150 150 2005-07-13 12:56:42.000 2 2 2020-12-23 07:16:54
7690 2005-07-28 03:26:21.000 1076 1076 150 150 2005-07-29 00:08:21.000 1 1 2020-12-23 07:17:10
9121 2005-07-30 09:36:26.000 3098 3098 150 150 2005-08-05 15:17:26.000 2 2 2020-12-23 07:17:31
10686 2005-08-01 17:51:21.000 2542 2542 150 150 2005-08-03 19:01:21.000 1 1 2020-12-23 07:17:53
11123 2005-08-02 08:54:17.000 1926 1926 150 150 2005-08-09 11:11:17.000 2 2 2020-12-23 07:17:59
11789 2005-08-17 10:59:24.000 851 851 150 150 2005-08-26 16:17:24.000 1 1 2020-12-23 07:18:08
12260 2005-08-18 04:15:43.000 1352 1352 150 150 2005-08-26 23:31:43.000 1 1 2020-12-23 07:18:15
12335 2005-08-18 06:59:15.000 2776 2776 150 150 2005-08-20 06:47:15.000 1 1 2020-12-23 07:18:16
12627 2005-08-18 17:37:11.000 3760 3760 150 150 2005-08-19 14:59:11.000 2 2 2020-12-23 07:18:20
12887 2005-08-19 03:38:54.000 1214 1214 150 150 2005-08-27 08:45:54.000 1 1 2020-12-23 07:18:23
12890 2005-08-19 03:42:08.000 3831 3831 150 150 2005-08-19 23:08:08.000 1 1 2020-12-23 07:18:23
13116 2005-08-19 11:31:41.000 1544 1544 150 150 2005-08-27 16:05:41.000 1 1 2020-12-23 07:18:27
13255 2005-08-19 16:54:12.000 1101 1101 150 150 2005-08-28 17:00:12.000 1 1 2020-12-23 07:18:29
13372 2005-08-19 21:23:19.000 3366 3366 150 150 2005-08-24 22:12:19.000 1 1 2020-12-23 07:18:31
13599 2005-08-20 06:00:03.000 3333 3333 150 150 2005-08-29 07:56:03.000 1 1 2020-12-23 07:18:34
14165 2005-08-21 02:59:17.000 4151 4151 150 150 2005-08-24 23:09:17.000 2 2 2020-12-23 07:18:43
14454 2005-08-21 12:35:49.000 2475 2475 150 150 2005-08-22 16:28:49.000 2 2 2020-12-23 07:18:47
14520 2005-08-21 15:00:49.000 4533 4533 150 150 2005-08-30 19:04:49.000 1 1 2020-12-23 07:18:48
14663 2005-08-21 19:47:55.000 2351 2351 150 150 2005-08-27 17:36:55.000 2 2 2020-12-23 07:18:50

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