home / sakila

rental

25 rows where customer_id = 507

✎ 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
52 2005-05-25 06:51:29.000 4017 4017 507 507 2005-05-31 01:27:29.000 2 2 2020-12-23 07:15:20
713 2005-05-29 04:10:17.000 3664 3664 507 507 2005-06-07 07:13:17.000 1 1 2020-12-23 07:15:29
1307 2005-06-15 10:06:15.000 368 368 507 507 2005-06-20 04:50:15.000 2 2 2020-12-23 07:15:37
2143 2005-06-17 21:58:13.000 1257 1257 507 507 2005-06-19 23:59:13.000 2 2 2020-12-23 07:15:49
2283 2005-06-18 06:56:06.000 2056 2056 507 507 2005-06-19 05:11:06.000 2 2 2020-12-23 07:15:51
3660 2005-07-06 08:07:29.000 1129 1129 507 507 2005-07-14 08:46:29.000 1 1 2020-12-23 07:16:10
3880 2005-07-06 18:32:49.000 42 42 507 507 2005-07-07 20:46:49.000 2 2 2020-12-23 07:16:14
4440 2005-07-07 23:00:58.000 1236 1236 507 507 2005-07-08 21:31:58.000 2 2 2020-12-23 07:16:22
4455 2005-07-07 23:43:46.000 1396 1396 507 507 2005-07-08 21:34:46.000 2 2 2020-12-23 07:16:22
4744 2005-07-08 13:43:57.000 2948 2948 507 507 2005-07-12 09:21:57.000 2 2 2020-12-23 07:16:27
4901 2005-07-08 20:44:51.000 2187 2187 507 507 2005-07-10 01:04:51.000 1 1 2020-12-23 07:16:29
5962 2005-07-10 23:45:22.000 1292 1292 507 507 2005-07-13 03:49:22.000 2 2 2020-12-23 07:16:45
6351 2005-07-11 20:31:44.000 1852 1852 507 507 2005-07-18 17:16:44.000 2 2 2020-12-23 07:16:50
6396 2005-07-11 22:31:08.000 2394 2394 507 507 2005-07-19 17:19:08.000 2 2 2020-12-23 07:16:51
6891 2005-07-12 21:07:35.000 3189 3189 507 507 2005-07-14 16:59:35.000 2 2 2020-12-23 07:16:58
7770 2005-07-28 06:49:35.000 1486 1486 507 507 2005-08-06 08:16:35.000 1 1 2020-12-23 07:17:11
7970 2005-07-28 13:58:38.000 998 998 507 507 2005-08-02 12:27:38.000 1 1 2020-12-23 07:17:14
8369 2005-07-29 05:15:42.000 1456 1456 507 507 2005-08-01 03:36:42.000 2 2 2020-12-23 07:17:20
8976 2005-07-30 04:12:32.000 2135 2135 507 507 2005-08-04 23:08:32.000 1 1 2020-12-23 07:17:29
9003 2005-07-30 05:02:52.000 1605 1605 507 507 2005-07-31 10:33:52.000 1 1 2020-12-23 07:17:29
12071 2005-08-17 21:49:14.000 1874 1874 507 507 2005-08-22 18:20:14.000 1 1 2020-12-23 07:18:12
12275 2005-08-18 04:42:02.000 1474 1474 507 507 2005-08-25 00:50:02.000 1 1 2020-12-23 07:18:15
12343 2005-08-18 07:15:13.000 448 448 507 507 2005-08-27 11:07:13.000 1 1 2020-12-23 07:18:16
14625 2005-08-21 18:34:21.000 2661 2661 507 507 2005-08-29 21:41:21.000 1 1 2020-12-23 07:18:49
15394 2005-08-22 23:04:21.000 3455 3455 507 507 2005-08-25 20:53:21.000 2 2 2020-12-23 07:19:01

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