home / sakila

rental

23 rows where customer_id = 246

✎ 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
124 2005-05-25 20:46:11.000 212 212 246 246 2005-05-30 00:47:11.000 2 2 2020-12-23 07:15:21
421 2005-05-27 15:30:13.000 2985 2985 246 246 2005-06-04 13:19:13.000 2 2 2020-12-23 07:15:25
434 2005-05-27 16:54:27.000 3360 3360 246 246 2005-06-04 22:26:27.000 1 1 2020-12-23 07:15:25
699 2005-05-29 02:11:44.000 130 130 246 246 2005-06-04 20:23:44.000 2 2 2020-12-23 07:15:29
1051 2005-05-31 07:02:09.000 1025 1025 246 246 2005-06-03 01:32:09.000 1 1 2020-12-23 07:15:34
1448 2005-06-15 19:17:16.000 2781 2781 246 246 2005-06-23 21:56:16.000 2 2 2020-12-23 07:15:39
1968 2005-06-17 09:20:36.000 1139 1139 246 246 2005-06-18 11:06:36.000 2 2 2020-12-23 07:15:46
2704 2005-06-19 13:50:10.000 2026 2026 246 246 2005-06-26 18:25:10.000 2 2 2020-12-23 07:15:57
2725 2005-06-19 15:01:23.000 63 63 246 246 2005-06-22 09:08:23.000 1 1 2020-12-23 07:15:57
3152 2005-06-20 20:42:41.000 1022 1022 246 246 2005-06-28 21:12:41.000 1 1 2020-12-23 07:16:03
4092 2005-07-07 05:54:18.000 1721 1721 246 246 2005-07-16 09:14:18.000 1 1 2020-12-23 07:16:17
4905 2005-07-08 20:56:00.000 4101 4101 246 246 2005-07-12 00:19:00.000 2 2 2020-12-23 07:16:29
4994 2005-07-09 00:54:13.000 2546 2546 246 246 2005-07-09 21:02:13.000 1 1 2020-12-23 07:16:31
5347 2005-07-09 17:31:32.000 1293 1293 246 246 2005-07-10 21:06:32.000 2 2 2020-12-23 07:16:35
6688 2005-07-12 12:22:12.000 2377 2377 246 246 2005-07-14 14:05:12.000 1 1 2020-12-23 07:16:55
9525 2005-07-31 01:02:18.000 2990 2990 246 246 2005-08-06 21:31:18.000 1 1 2020-12-23 07:17:37
10208 2005-08-01 00:54:51.000 3324 3324 246 246 2005-08-04 22:39:51.000 2 2 2020-12-23 07:17:46
10683 2005-08-01 17:33:03.000 244 244 246 246 2005-08-04 23:12:03.000 1 1 2020-12-23 07:17:53
13418 2005-08-19 22:53:56.000 2113 2113 246 246 2005-08-28 02:05:56.000 2 2 2020-12-23 07:18:31
13750 2005-08-20 11:11:42.000 3363 3363 246 246 2005-08-29 16:16:42.000 2 2 2020-12-23 07:18:37
13987 2005-08-20 19:19:30.000 1443 1443 246 246 2005-08-23 15:37:30.000 2 2 2020-12-23 07:18:40
14360 2005-08-21 09:16:40.000 2677 2677 246 246 2005-08-29 11:43:40.000 2 2 2020-12-23 07:18:46
15746 2005-08-23 12:26:19.000 2241 2241 246 246 2005-08-26 09:51:19.000 2 2 2020-12-23 07:19:05

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