home / sakila

rental

23 rows where customer_id = 185

✎ 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
20 2005-05-25 01:48:41.000 3517 3517 185 185 2005-05-27 02:20:41.000 2 2 2020-12-23 07:15:20
154 2005-05-26 00:55:56.000 1354 1354 185 185 2005-05-29 23:18:56.000 2 2 2020-12-23 07:15:22
646 2005-05-28 19:16:14.000 1922 1922 185 185 2005-05-31 16:50:14.000 2 2 2020-12-23 07:15:28
2459 2005-06-18 19:44:08.000 1024 1024 185 185 2005-06-23 19:14:08.000 2 2 2020-12-23 07:15:53
3314 2005-06-21 08:17:00.000 4332 4332 185 185 2005-06-22 06:00:00.000 2 2 2020-12-23 07:16:05
3325 2005-06-21 08:51:44.000 1720 1720 185 185 2005-06-27 06:16:44.000 1 1 2020-12-23 07:16:05
4186 2005-07-07 10:32:25.000 3910 3910 185 185 2005-07-15 06:22:25.000 1 1 2020-12-23 07:16:18
4524 2005-07-08 03:10:48.000 2218 2218 185 185 2005-07-09 07:49:48.000 2 2 2020-12-23 07:16:23
4822 2005-07-08 17:28:47.000 3970 3970 185 185 2005-07-14 13:06:47.000 1 1 2020-12-23 07:16:28
6106 2005-07-11 07:05:06.000 2714 2714 185 185 2005-07-20 09:27:06.000 1 1 2020-12-23 07:16:47
6418 2005-07-11 23:36:27.000 3101 3101 185 185 2005-07-16 18:42:27.000 1 1 2020-12-23 07:16:51
6965 2005-07-27 00:15:18.000 74 74 185 185 2005-07-28 04:30:18.000 2 2 2020-12-23 07:16:59
7066 2005-07-27 03:53:52.000 1862 1862 185 185 2005-08-05 03:32:52.000 1 1 2020-12-23 07:17:01
8200 2005-07-28 23:10:46.000 353 353 185 185 2005-07-29 18:35:46.000 1 1 2020-12-23 07:17:17
8442 2005-07-29 07:33:07.000 4345 4345 185 185 2005-08-03 03:09:07.000 2 2 2020-12-23 07:17:21
8684 2005-07-29 16:16:33.000 2457 2457 185 185 2005-08-07 12:27:33.000 2 2 2020-12-23 07:17:25
9246 2005-07-30 14:12:31.000 3390 3390 185 185 2005-08-02 14:25:31.000 2 2 2020-12-23 07:17:33
9473 2005-07-30 23:04:13.000 1717 1717 185 185 2005-08-04 21:48:13.000 2 2 2020-12-23 07:17:36
11355 2005-08-02 17:37:43.000 2673 2673 185 185 2005-08-05 19:59:43.000 1 1 2020-12-23 07:18:02
12312 2005-08-18 06:07:26.000 80 80 185 185 2005-08-21 02:07:26.000 2 2 2020-12-23 07:18:15
12674 2005-08-18 19:24:56.000 636 636 185 185 2005-08-26 22:16:56.000 2 2 2020-12-23 07:18:20
12885 2005-08-19 03:37:25.000 883 883 185 185 2005-08-20 22:10:25.000 1 1 2020-12-23 07:18:23
14513 2005-08-21 14:51:35.000 4265 4265 185 185 2005-08-24 13:24:35.000 2 2 2020-12-23 07:18:48

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