home / sakila

rental

32 rows where customer_id = 550

✎ 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
922 2005-05-30 11:55:55.000 2442 2442 550 550 2005-06-08 10:12:55.000 2 2 2020-12-23 07:15:32
1233 2005-06-15 04:18:37.000 4214 4214 550 550 2005-06-22 03:36:37.000 1 1 2020-12-23 07:15:36
1863 2005-06-17 01:31:46.000 4466 4466 550 550 2005-06-26 02:09:46.000 2 2 2020-12-23 07:15:45
1883 2005-06-17 03:18:51.000 3504 3504 550 550 2005-06-18 05:46:51.000 1 1 2020-12-23 07:15:45
3154 2005-06-20 20:44:40.000 3195 3195 550 550 2005-06-23 19:10:40.000 1 1 2020-12-23 07:16:03
3236 2005-06-21 02:47:43.000 1492 1492 550 550 2005-06-29 08:04:43.000 2 2 2020-12-23 07:16:04
3272 2005-06-21 05:18:27.000 1090 1090 550 550 2005-06-30 02:51:27.000 1 1 2020-12-23 07:16:04
3979 2005-07-06 23:04:35.000 794 794 550 550 2005-07-13 01:38:35.000 2 2 2020-12-23 07:16:15
5727 2005-07-10 11:25:28.000 3338 3338 550 550 2005-07-11 11:03:28.000 2 2 2020-12-23 07:16:41
6695 2005-07-12 12:39:39.000 3088 3088 550 550 2005-07-17 13:36:39.000 2 2 2020-12-23 07:16:55
7030 2005-07-27 03:01:40.000 1277 1277 550 550 2005-07-31 07:01:40.000 1 1 2020-12-23 07:17:00
7838 2005-07-28 09:00:21.000 2222 2222 550 550 2005-07-29 05:52:21.000 1 1 2020-12-23 07:17:12
8628 2005-07-29 14:06:24.000 4484 4484 550 550 2005-08-06 10:42:24.000 2 2 2020-12-23 07:17:24
8838 2005-07-29 22:52:23.000 133 133 550 550 2005-08-03 22:49:23.000 1 1 2020-12-23 07:17:27
8959 2005-07-30 03:35:49.000 3508 3508 550 550 2005-08-06 02:02:49.000 2 2 2020-12-23 07:17:29
9616 2005-07-31 04:05:01.000 1210 1210 550 550 2005-08-05 00:10:01.000 1 1 2020-12-23 07:17:38
9748 2005-07-31 09:17:56.000 3308 3308 550 550 2005-08-02 14:54:56.000 1 1 2020-12-23 07:17:40
10140 2005-07-31 22:03:20.000 2494 2494 550 550 2005-08-07 23:15:20.000 2 2 2020-12-23 07:17:46
11246 2005-08-02 13:33:56.000 3577 3577 550 550 2005-08-03 08:52:56.000 2 2 2020-12-23 07:18:01
11320 2005-08-02 16:13:28.000 3362 3362 550 550 2005-08-05 21:23:28.000 1 1 2020-12-23 07:18:02
11757 2006-02-14 15:16:03.000 1295 1295 550 550   2 2 2020-12-23 07:18:08
11969 2005-08-17 17:49:37.000 668 668 550 550 2005-08-19 19:45:37.000 2 2 2020-12-23 07:18:11
12063 2005-08-17 21:24:48.000 1141 1141 550 550 2005-08-23 22:10:48.000 2 2 2020-12-23 07:18:12
12077 2005-08-17 21:59:14.000 3589 3589 550 550 2005-08-22 03:23:14.000 1 1 2020-12-23 07:18:12
13114 2005-08-19 11:27:32.000 4342 4342 550 550 2005-08-28 11:21:32.000 2 2 2020-12-23 07:18:27
14071 2005-08-20 23:01:56.000 2471 2471 550 550 2005-08-22 02:14:56.000 1 1 2020-12-23 07:18:42
14127 2005-08-21 01:33:32.000 4532 4532 550 550 2005-08-22 02:47:32.000 2 2 2020-12-23 07:18:42
14375 2005-08-21 09:46:35.000 2507 2507 550 550 2005-08-26 10:24:35.000 2 2 2020-12-23 07:18:46
14687 2005-08-21 20:32:16.000 306 306 550 550 2005-08-26 16:17:16.000 2 2 2020-12-23 07:18:50
15431 2005-08-23 00:26:47.000 3251 3251 550 550 2005-08-31 23:26:47.000 2 2 2020-12-23 07:19:01
15883 2005-08-23 16:44:56.000 2792 2792 550 550 2005-08-24 22:42:56.000 1 1 2020-12-23 07:19:08
15977 2005-08-23 20:07:10.000 1031 1031 550 550 2005-09-01 22:12:10.000 2 2 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 10.379ms