home / sakila

rental

32 rows where customer_id = 125

✎ 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
185 2005-05-26 05:30:03.000 2598 2598 125 125 2005-06-02 09:48:03.000 2 2 2020-12-23 07:15:22
1481 2005-06-15 21:17:58.000 3041 3041 125 125 2005-06-18 17:53:58.000 2 2 2020-12-23 07:15:39
2355 2005-06-18 12:57:06.000 3613 3613 125 125 2005-06-26 07:32:06.000 1 1 2020-12-23 07:15:52
2826 2005-06-19 20:41:35.000 2980 2980 125 125 2005-06-25 17:23:35.000 1 1 2020-12-23 07:15:58
3118 2005-06-20 18:05:57.000 1258 1258 125 125 2005-06-23 23:01:57.000 1 1 2020-12-23 07:16:02
3617 2005-07-06 05:58:06.000 1337 1337 125 125 2005-07-13 02:10:06.000 1 1 2020-12-23 07:16:10
5200 2005-07-09 10:52:09.000 4528 4528 125 125 2005-07-13 15:12:09.000 1 1 2020-12-23 07:16:33
5523 2005-07-10 01:47:55.000 2233 2233 125 125 2005-07-18 22:25:55.000 1 1 2020-12-23 07:16:38
6055 2005-07-11 03:59:08.000 595 595 125 125 2005-07-18 05:35:08.000 2 2 2020-12-23 07:16:46
6268 2005-07-11 15:55:34.000 1154 1154 125 125 2005-07-19 17:25:34.000 1 1 2020-12-23 07:16:49
7323 2005-07-27 13:39:40.000 3830 3830 125 125 2005-07-29 08:45:40.000 2 2 2020-12-23 07:17:05
7879 2005-07-28 10:27:46.000 1969 1969 125 125 2005-07-31 07:48:46.000 1 1 2020-12-23 07:17:13
7922 2005-07-28 12:05:25.000 817 817 125 125 2005-08-02 12:13:25.000 2 2 2020-12-23 07:17:13
8375 2005-07-29 05:25:30.000 3634 3634 125 125 2005-08-04 01:43:30.000 2 2 2020-12-23 07:17:20
8433 2005-07-29 07:19:16.000 1957 1957 125 125 2005-08-05 03:29:16.000 1 1 2020-12-23 07:17:21
8832 2005-07-29 22:37:49.000 380 380 125 125 2005-08-04 23:32:49.000 1 1 2020-12-23 07:17:27
9129 2005-07-30 09:51:21.000 2658 2658 125 125 2005-08-07 08:50:21.000 2 2 2020-12-23 07:17:31
9496 2005-07-30 23:55:20.000 453 453 125 125 2005-08-02 02:47:20.000 2 2 2020-12-23 07:17:36
9504 2005-07-31 00:09:07.000 91 91 125 125 2005-08-02 05:44:07.000 1 1 2020-12-23 07:17:36
9722 2005-07-31 08:29:48.000 4260 4260 125 125 2005-08-07 07:52:48.000 2 2 2020-12-23 07:17:40
9734 2005-07-31 08:57:45.000 3320 3320 125 125 2005-08-05 11:57:45.000 1 1 2020-12-23 07:17:40
10583 2005-08-01 13:54:35.000 704 704 125 125 2005-08-03 18:21:35.000 1 1 2020-12-23 07:17:52
10699 2005-08-01 18:24:51.000 1029 1029 125 125 2005-08-06 20:18:51.000 1 1 2020-12-23 07:17:54
11279 2005-08-02 14:30:03.000 151 151 125 125 2005-08-10 09:49:03.000 2 2 2020-12-23 07:18:01
11806 2005-08-17 11:49:28.000 3203 3203 125 125 2005-08-22 15:42:28.000 1 1 2020-12-23 07:18:09
11832 2005-08-17 12:55:31.000 2331 2331 125 125 2005-08-19 08:31:31.000 1 1 2020-12-23 07:18:09
11999 2005-08-17 18:47:07.000 4333 4333 125 125 2005-08-20 23:26:07.000 2 2 2020-12-23 07:18:11
12075 2005-08-17 21:54:55.000 3147 3147 125 125 2005-08-23 23:04:55.000 1 1 2020-12-23 07:18:12
12262 2005-08-18 04:16:15.000 591 591 125 125 2005-08-20 09:16:15.000 1 1 2020-12-23 07:18:15
13441 2005-08-19 23:48:23.000 3188 3188 125 125 2005-08-28 23:47:23.000 1 1 2020-12-23 07:18:32
14456 2005-08-21 12:38:09.000 2520 2520 125 125 2005-08-26 08:29:09.000 1 1 2020-12-23 07:18:47
15055 2005-08-22 10:14:39.000 623 623 125 125 2005-08-25 07:25:39.000 2 2 2020-12-23 07:18:56

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