home / sakila

rental

26 rows where customer_id = 294

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
595 2005-05-28 13:59:54.000 595 595 294 294 2005-06-05 15:16:54.000 1 1 2020-12-23 07:15:27
2900 2005-06-20 02:40:04.000 3407 3407 294 294 2005-06-27 20:47:04.000 2 2 2020-12-23 07:15:59
3330 2005-06-21 09:22:37.000 299 299 294 294 2005-06-23 07:16:37.000 2 2 2020-12-23 07:16:05
3681 2005-07-06 09:19:30.000 3325 3325 294 294 2005-07-11 09:40:30.000 1 1 2020-12-23 07:16:11
4019 2005-07-07 01:27:44.000 3200 3200 294 294 2005-07-10 21:30:44.000 1 1 2020-12-23 07:16:16
4786 2005-07-08 16:13:05.000 2724 2724 294 294 2005-07-16 15:29:05.000 1 1 2020-12-23 07:16:27
6185 2005-07-11 11:25:09.000 4331 4331 294 294 2005-07-18 12:09:09.000 2 2 2020-12-23 07:16:47
7415 2005-07-27 16:50:59.000 4410 4410 294 294 2005-08-02 11:21:59.000 1 1 2020-12-23 07:17:06
7765 2005-07-28 06:40:33.000 4098 4098 294 294 2005-07-31 01:25:33.000 1 1 2020-12-23 07:17:11
8843 2005-07-29 23:04:25.000 406 406 294 294 2005-08-05 22:12:25.000 1 1 2020-12-23 07:17:27
9194 2005-07-30 12:28:45.000 2467 2467 294 294 2005-08-06 14:38:45.000 1 1 2020-12-23 07:17:32
9522 2005-07-31 00:55:11.000 4266 4266 294 294 2005-08-03 06:41:11.000 2 2 2020-12-23 07:17:37
9607 2005-07-31 03:51:06.000 3414 3414 294 294 2005-08-02 00:18:06.000 2 2 2020-12-23 07:17:38
10186 2005-08-01 00:12:36.000 4563 4563 294 294 2005-08-07 05:08:36.000 1 1 2020-12-23 07:17:46
10220 2005-08-01 01:13:22.000 3920 3920 294 294 2005-08-04 22:57:22.000 2 2 2020-12-23 07:17:47
10551 2005-08-01 12:48:55.000 2974 2974 294 294 2005-08-10 16:11:55.000 1 1 2020-12-23 07:17:51
10600 2005-08-01 14:25:21.000 3900 3900 294 294 2005-08-06 18:00:21.000 1 1 2020-12-23 07:17:52
10642 2005-08-01 15:45:11.000 2573 2573 294 294 2005-08-02 20:13:11.000 1 1 2020-12-23 07:17:53
11071 2005-08-02 07:10:53.000 4264 4264 294 294 2005-08-07 09:58:53.000 1 1 2020-12-23 07:17:59
11390 2005-08-02 18:39:16.000 3135 3135 294 294 2005-08-04 21:43:16.000 1 1 2020-12-23 07:18:03
11875 2005-08-17 14:16:48.000 1787 1787 294 294 2005-08-26 14:20:48.000 1 1 2020-12-23 07:18:10
11981 2005-08-17 18:10:40.000 3228 3228 294 294 2005-08-20 16:56:40.000 1 1 2020-12-23 07:18:11
12278 2005-08-18 04:46:45.000 3205 3205 294 294 2005-08-24 08:59:45.000 2 2 2020-12-23 07:18:15
14474 2005-08-21 13:22:48.000 2632 2632 294 294 2005-08-27 14:13:48.000 2 2 2020-12-23 07:18:47
14630 2005-08-21 18:43:44.000 4049 4049 294 294 2005-08-29 17:08:44.000 2 2 2020-12-23 07:18:49
15839 2005-08-23 15:34:46.000 3726 3726 294 294 2005-08-30 21:00:46.000 2 2 2020-12-23 07:19:07

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