home / sakila

rental

26 rows where customer_id = 425

✎ 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
1098 2005-05-31 13:51:48.000 1050 1050 425 425 2005-06-09 18:42:48.000 2 2 2020-12-23 07:15:34
3276 2005-06-21 05:35:52.000 1890 1890 425 425 2005-06-29 03:26:52.000 2 2 2020-12-23 07:16:05
3807 2005-07-06 15:11:44.000 39 39 425 425 2005-07-10 09:20:44.000 1 1 2020-12-23 07:16:13
4361 2005-07-07 19:33:23.000 116 116 425 425 2005-07-12 22:36:23.000 1 1 2020-12-23 07:16:21
4362 2005-07-07 19:35:30.000 3759 3759 425 425 2005-07-14 14:59:30.000 1 1 2020-12-23 07:16:21
4483 2005-07-08 01:03:12.000 1222 1222 425 425 2005-07-17 00:20:12.000 1 1 2020-12-23 07:16:23
4659 2005-07-08 09:53:28.000 4389 4389 425 425 2005-07-14 14:56:28.000 2 2 2020-12-23 07:16:25
4884 2005-07-08 19:49:17.000 3543 3543 425 425 2005-07-15 23:14:17.000 2 2 2020-12-23 07:16:29
4939 2005-07-08 22:35:30.000 3201 3201 425 425 2005-07-17 22:05:30.000 1 1 2020-12-23 07:16:30
5363 2005-07-09 18:18:49.000 2180 2180 425 425 2005-07-14 22:16:49.000 1 1 2020-12-23 07:16:36
5371 2005-07-09 18:47:48.000 789 789 425 425 2005-07-14 14:39:48.000 2 2 2020-12-23 07:16:36
6318 2005-07-11 18:48:22.000 2048 2048 425 425 2005-07-12 13:39:22.000 1 1 2020-12-23 07:16:49
6603 2005-07-12 07:52:55.000 3583 3583 425 425 2005-07-16 13:19:55.000 2 2 2020-12-23 07:16:54
7249 2005-07-27 10:39:53.000 2441 2441 425 425 2005-07-28 14:48:53.000 2 2 2020-12-23 07:17:03
8974 2005-07-30 04:09:16.000 3376 3376 425 425 2005-08-04 06:55:16.000 1 1 2020-12-23 07:17:29
9170 2005-07-30 11:35:24.000 4279 4279 425 425 2005-08-05 05:36:24.000 1 1 2020-12-23 07:17:32
9682 2005-07-31 06:47:10.000 2427 2427 425 425 2005-08-04 09:07:10.000 1 1 2020-12-23 07:17:39
10121 2005-07-31 21:24:53.000 2969 2969 425 425 2005-08-03 22:24:53.000 1 1 2020-12-23 07:17:45
10163 2005-07-31 23:12:34.000 2811 2811 425 425 2005-08-01 22:47:34.000 2 2 2020-12-23 07:17:46
10545 2005-08-01 12:37:46.000 4230 4230 425 425 2005-08-04 16:02:46.000 2 2 2020-12-23 07:17:51
13040 2005-08-19 09:04:24.000 4113 4113 425 425 2005-08-23 12:36:24.000 2 2 2020-12-23 07:18:26
14089 2005-08-20 23:59:02.000 1400 1400 425 425 2005-08-27 00:19:02.000 1 1 2020-12-23 07:18:42
14881 2005-08-22 03:47:39.000 210 210 425 425 2005-08-26 05:58:39.000 2 2 2020-12-23 07:18:53
15064 2005-08-22 10:41:58.000 1233 1233 425 425 2005-08-28 13:34:58.000 2 2 2020-12-23 07:18:56
15784 2005-08-23 13:46:00.000 126 126 425 425 2005-08-30 11:49:00.000 2 2 2020-12-23 07:19:06
16036 2005-08-23 22:12:44.000 1372 1372 425 425 2005-08-25 17:48:44.000 2 2 2020-12-23 07:19:10

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 9.63ms