home / sakila

rental

30 rows where customer_id = 289

✎ 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
1880 2005-06-17 03:08:59.000 1133 1133 289 289 2005-06-19 07:16:59.000 1 1 2020-12-23 07:15:45
2316 2005-06-18 09:04:59.000 372 372 289 289 2005-06-20 09:39:59.000 2 2 2020-12-23 07:15:51
2387 2005-06-18 15:24:19.000 692 692 289 289 2005-06-25 17:41:19.000 2 2 2020-12-23 07:15:52
2784 2005-06-19 18:40:29.000 2305 2305 289 289 2005-06-28 15:27:29.000 1 1 2020-12-23 07:15:58
2948 2005-06-20 06:02:35.000 4254 4254 289 289 2005-06-29 09:12:35.000 2 2 2020-12-23 07:16:00
3123 2005-06-20 18:26:14.000 1656 1656 289 289 2005-06-29 17:17:14.000 1 1 2020-12-23 07:16:02
3588 2005-07-06 04:29:13.000 3154 3154 289 289 2005-07-07 23:49:13.000 1 1 2020-12-23 07:16:09
4622 2005-07-08 08:02:42.000 2710 2710 289 289 2005-07-10 07:46:42.000 2 2 2020-12-23 07:16:25
5089 2005-07-09 05:45:40.000 451 451 289 289 2005-07-15 05:31:40.000 1 1 2020-12-23 07:16:32
5342 2005-07-09 17:20:03.000 3828 3828 289 289 2005-07-18 12:44:03.000 2 2 2020-12-23 07:16:35
5584 2005-07-10 04:15:25.000 2606 2606 289 289 2005-07-16 22:54:25.000 2 2 2020-12-23 07:16:39
5724 2005-07-10 11:18:12.000 3597 3597 289 289 2005-07-16 14:53:12.000 2 2 2020-12-23 07:16:41
6007 2005-07-11 01:43:06.000 4393 4393 289 289 2005-07-17 04:46:06.000 1 1 2020-12-23 07:16:45
6536 2005-07-12 04:44:25.000 3521 3521 289 289 2005-07-18 01:52:25.000 2 2 2020-12-23 07:16:53
7151 2005-07-27 07:14:31.000 1259 1259 289 289 2005-08-01 01:35:31.000 2 2 2020-12-23 07:17:02
7162 2005-07-27 07:32:45.000 2251 2251 289 289 2005-07-30 03:48:45.000 1 1 2020-12-23 07:17:02
7325 2005-07-27 13:46:55.000 1727 1727 289 289 2005-07-28 14:21:55.000 1 1 2020-12-23 07:17:05
9498 2005-07-30 23:56:55.000 1035 1035 289 289 2005-08-03 18:34:55.000 2 2 2020-12-23 07:17:36
10297 2005-08-01 04:05:04.000 2795 2795 289 289 2005-08-09 06:08:04.000 1 1 2020-12-23 07:17:48
12158 2005-08-18 00:34:20.000 4121 4121 289 289 2005-08-22 20:10:20.000 2 2 2020-12-23 07:18:13
12170 2005-08-18 01:06:10.000 1125 1125 289 289 2005-08-25 02:40:10.000 2 2 2020-12-23 07:18:14
12558 2005-08-18 14:52:35.000 167 167 289 289 2005-08-26 09:45:35.000 2 2 2020-12-23 07:18:19
13165 2005-08-19 13:34:10.000 138 138 289 289 2005-08-21 18:33:10.000 2 2 2020-12-23 07:18:28
13211 2005-08-19 15:23:41.000 1968 1968 289 289 2005-08-22 16:58:41.000 1 1 2020-12-23 07:18:28
13256 2005-08-19 16:54:12.000 2719 2719 289 289 2005-08-28 16:54:12.000 1 1 2020-12-23 07:18:29
13336 2005-08-19 20:03:22.000 1011 1011 289 289 2005-08-24 23:42:22.000 1 1 2020-12-23 07:18:30
13891 2005-08-20 15:42:05.000 2042 2042 289 289 2005-08-25 13:26:05.000 1 1 2020-12-23 07:18:39
14087 2005-08-20 23:53:40.000 2368 2368 289 289 2005-08-26 20:22:40.000 1 1 2020-12-23 07:18:42
14729 2005-08-21 22:16:57.000 2483 2483 289 289 2005-08-27 21:32:57.000 1 1 2020-12-23 07:18:51
14917 2005-08-22 05:03:59.000 377 377 289 289 2005-08-29 04:00:59.000 2 2 2020-12-23 07:18:53

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