home / sakila

rental

30 rows where customer_id = 418

✎ 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
2825 2005-06-19 20:32:19.000 2601 2601 418 418 2005-06-22 22:32:19.000 1 1 2020-12-23 07:15:58
2943 2005-06-20 05:43:05.000 2591 2591 418 418 2005-06-25 04:31:05.000 1 1 2020-12-23 07:16:00
2969 2005-06-20 07:44:27.000 1748 1748 418 418 2005-06-22 06:12:27.000 2 2 2020-12-23 07:16:00
3805 2005-07-06 15:08:42.000 1716 1716 418 418 2005-07-07 14:34:42.000 1 1 2020-12-23 07:16:12
4852 2005-07-08 18:43:15.000 3545 3545 418 418 2005-07-15 18:48:15.000 2 2 2020-12-23 07:16:28
4865 2005-07-08 19:09:04.000 1614 1614 418 418 2005-07-13 21:25:04.000 2 2 2020-12-23 07:16:29
4938 2005-07-08 22:32:53.000 2164 2164 418 418 2005-07-14 16:48:53.000 2 2 2020-12-23 07:16:30
6150 2005-07-11 09:23:56.000 1110 1110 418 418 2005-07-15 10:56:56.000 2 2 2020-12-23 07:16:47
6970 2005-07-27 00:26:14.000 17 17 418 418 2005-08-03 20:00:14.000 2 2 2020-12-23 07:16:59
8546 2005-07-29 11:08:48.000 3224 3224 418 418 2005-08-03 16:50:48.000 2 2 2020-12-23 07:17:23
8591 2005-07-29 12:32:33.000 2568 2568 418 418 2005-08-01 16:19:33.000 2 2 2020-12-23 07:17:23
8886 2005-07-30 00:36:31.000 1469 1469 418 418 2005-08-08 06:18:31.000 1 1 2020-12-23 07:17:27
9558 2005-07-31 02:14:35.000 1161 1161 418 418 2005-08-06 03:00:35.000 1 1 2020-12-23 07:17:37
10537 2005-08-01 12:22:28.000 2140 2140 418 418 2005-08-08 07:27:28.000 1 1 2020-12-23 07:17:51
10709 2005-08-01 18:43:57.000 282 282 418 418 2005-08-06 13:17:57.000 2 2 2020-12-23 07:17:54
10915 2005-08-02 02:05:04.000 4568 4568 418 418 2005-08-10 21:58:04.000 2 2 2020-12-23 07:17:57
11270 2005-08-02 14:18:07.000 1882 1882 418 418 2005-08-03 08:20:07.000 1 1 2020-12-23 07:18:01
11322 2005-08-02 16:23:17.000 761 761 418 418 2005-08-09 19:55:17.000 2 2 2020-12-23 07:18:02
11409 2005-08-02 19:26:51.000 3691 3691 418 418 2005-08-07 19:55:51.000 1 1 2020-12-23 07:18:03
11650 2005-08-17 05:00:03.000 3979 3979 418 418 2005-08-22 01:45:03.000 2 2 2020-12-23 07:18:07
11769 2005-08-17 10:04:49.000 1406 1406 418 418 2005-08-20 09:22:49.000 1 1 2020-12-23 07:18:08
11910 2005-08-17 15:44:37.000 4254 4254 418 418 2005-08-19 10:58:37.000 2 2 2020-12-23 07:18:10
13312 2005-08-19 19:09:14.000 2891 2891 418 418 2005-08-23 00:50:14.000 2 2 2020-12-23 07:18:30
13537 2005-08-20 03:39:15.000 2521 2521 418 418 2005-08-23 22:03:15.000 2 2 2020-12-23 07:18:33
13970 2005-08-20 18:43:34.000 1942 1942 418 418 2005-08-22 15:17:34.000 2 2 2020-12-23 07:18:40
14484 2005-08-21 13:47:29.000 3714 3714 418 418 2005-08-23 18:25:29.000 1 1 2020-12-23 07:18:48
14836 2005-08-22 01:52:26.000 4287 4287 418 418 2005-08-22 23:39:26.000 1 1 2020-12-23 07:18:52
14860 2005-08-22 02:47:07.000 1368 1368 418 418 2005-08-28 00:00:07.000 1 1 2020-12-23 07:18:53
15466 2005-08-23 01:16:55.000 571 571 418 418 2005-08-29 22:57:55.000 1 1 2020-12-23 07:19:02
15957 2005-08-23 19:21:22.000 74 74 418 418 2005-08-31 16:42:22.000 1 1 2020-12-23 07:19:09

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