home / sakila

rental

27 rows where customer_id = 228

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: rental_date, 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
492 2005-05-28 00:24:58.000 1999 1999 228 228 2005-05-28 22:34:58.000 1 1 2020-12-23 07:15:26
1070 2005-05-31 09:39:56.000 3170 3170 228 228 2005-06-05 10:23:56.000 1 1 2020-12-23 07:15:34
2284 2005-06-18 06:59:51.000 2682 2682 228 228 2005-06-24 04:58:51.000 2 2 2020-12-23 07:15:51
2863 2005-06-19 23:58:38.000 2410 2410 228 228 2005-06-23 23:27:38.000 2 2 2020-12-23 07:15:59
2934 2005-06-20 05:05:53.000 697 697 228 228 2005-06-22 02:44:53.000 1 1 2020-12-23 07:16:00
3433 2005-06-21 19:07:19.000 1077 1077 228 228 2005-06-29 18:01:19.000 2 2 2020-12-23 07:16:07
3538 2005-07-06 01:37:07.000 4361 4361 228 228 2005-07-11 06:02:07.000 2 2 2020-12-23 07:16:08
3710 2005-07-06 10:28:53.000 2596 2596 228 228 2005-07-15 06:17:53.000 2 2 2020-12-23 07:16:11
3715 2005-07-06 10:51:48.000 4456 4456 228 228 2005-07-11 06:08:48.000 1 1 2020-12-23 07:16:11
3796 2005-07-06 14:45:22.000 1649 1649 228 228 2005-07-07 11:01:22.000 2 2 2020-12-23 07:16:12
4217 2005-07-07 12:08:59.000 3186 3186 228 228 2005-07-11 15:07:59.000 2 2 2020-12-23 07:16:19
4636 2005-07-08 08:44:32.000 1858 1858 228 228 2005-07-10 08:59:32.000 2 2 2020-12-23 07:16:25
4909 2005-07-08 21:07:24.000 1451 1451 228 228 2005-07-10 22:34:24.000 1 1 2020-12-23 07:16:29
5151 2005-07-09 08:31:03.000 224 224 228 228 2005-07-10 08:18:03.000 2 2 2020-12-23 07:16:33
5320 2005-07-09 16:23:32.000 3140 3140 228 228 2005-07-18 18:16:32.000 1 1 2020-12-23 07:16:35
5902 2005-07-10 20:31:24.000 2727 2727 228 228 2005-07-11 20:50:24.000 1 1 2020-12-23 07:16:44
6141 2005-07-11 08:52:16.000 2279 2279 228 228 2005-07-17 03:00:16.000 1 1 2020-12-23 07:16:47
6948 2005-07-26 23:43:49.000 3088 3088 228 228 2005-07-27 21:24:49.000 2 2 2020-12-23 07:16:59
7509 2005-07-27 20:37:19.000 4134 4134 228 228 2005-08-04 19:35:19.000 2 2 2020-12-23 07:17:07
7601 2005-07-27 23:48:15.000 903 903 228 228 2005-07-29 02:45:15.000 1 1 2020-12-23 07:17:09
8147 2005-07-28 20:37:56.000 628 628 228 228 2005-07-30 18:26:56.000 1 1 2020-12-23 07:17:17
10585 2005-08-01 14:00:42.000 2670 2670 228 228 2005-08-09 11:42:42.000 2 2 2020-12-23 07:17:52
12304 2005-08-18 05:44:29.000 1381 1381 228 228 2005-08-24 04:31:29.000 1 1 2020-12-23 07:18:15
12672 2006-02-14 15:16:03.000 1722 1722 228 228   1 1 2020-12-23 07:18:20
12952 2005-08-19 06:00:52.000 2460 2460 228 228 2005-08-20 02:17:52.000 1 1 2020-12-23 07:18:24
13458 2005-08-20 00:35:30.000 4223 4223 228 228 2005-08-21 20:51:30.000 1 1 2020-12-23 07:18:32
15234 2006-02-14 15:16:03.000 908 908 228 228   2 2 2020-12-23 07:18:58

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