home / sakila

rental

25 rows where customer_id = 270

✎ 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
193 2005-05-26 06:41:48.000 3900 3900 270 270 2005-05-30 06:21:48.000 2 2 2020-12-23 07:15:22
1040 2005-05-31 05:35:16.000 2546 2546 270 270 2005-06-09 04:14:16.000 1 1 2020-12-23 07:15:33
1345 2005-06-15 12:32:13.000 1041 1041 270 270 2005-06-24 14:02:13.000 1 1 2020-12-23 07:15:37
1896 2005-06-17 04:25:46.000 2077 2077 270 270 2005-06-26 09:37:46.000 1 1 2020-12-23 07:15:45
2115 2005-06-17 20:02:16.000 3448 3448 270 270 2005-06-25 16:56:16.000 2 2 2020-12-23 07:15:48
3164 2005-06-20 21:29:00.000 155 155 270 270 2005-06-27 15:50:00.000 1 1 2020-12-23 07:16:03
3501 2005-07-06 00:11:28.000 2219 2219 270 270 2005-07-10 20:32:28.000 2 2 2020-12-23 07:16:08
3987 2005-07-06 23:28:24.000 3104 3104 270 270 2005-07-15 00:52:24.000 1 1 2020-12-23 07:16:15
5533 2005-07-10 02:19:28.000 2567 2567 270 270 2005-07-11 01:37:28.000 1 1 2020-12-23 07:16:38
6520 2005-07-12 04:05:16.000 1535 1535 270 270 2005-07-15 08:26:16.000 1 1 2020-12-23 07:16:52
8355 2005-07-29 04:57:43.000 4569 4569 270 270 2005-08-03 06:25:43.000 1 1 2020-12-23 07:17:20
8618 2005-07-29 13:48:20.000 985 985 270 270 2005-08-06 14:12:20.000 2 2 2020-12-23 07:17:24
10069 2005-07-31 19:43:18.000 2168 2168 270 270 2005-08-06 19:40:18.000 2 2 2020-12-23 07:17:45
10461 2005-08-01 09:32:53.000 3212 3212 270 270 2005-08-09 10:19:53.000 1 1 2020-12-23 07:17:50
10579 2005-08-01 13:48:22.000 4068 4068 270 270 2005-08-07 11:51:22.000 1 1 2020-12-23 07:17:52
10648 2005-08-01 16:08:52.000 691 691 270 270 2005-08-05 20:17:52.000 1 1 2020-12-23 07:17:53
11389 2005-08-02 18:39:12.000 3267 3267 270 270 2005-08-03 23:23:12.000 2 2 2020-12-23 07:18:03
11810 2005-08-17 11:56:48.000 1548 1548 270 270 2005-08-20 17:39:48.000 1 1 2020-12-23 07:18:09
11841 2005-08-17 13:12:20.000 1524 1524 270 270 2005-08-21 11:16:20.000 2 2 2020-12-23 07:18:09
11917 2005-08-17 16:08:17.000 1608 1608 270 270 2005-08-20 20:01:17.000 1 1 2020-12-23 07:18:10
12192 2005-08-18 02:01:40.000 3450 3450 270 270 2005-08-21 05:45:40.000 1 1 2020-12-23 07:18:14
12442 2005-08-18 10:50:07.000 78 78 270 270 2005-08-21 08:06:07.000 1 1 2020-12-23 07:18:17
13945 2005-08-20 17:43:56.000 3328 3328 270 270 2005-08-26 19:19:56.000 1 1 2020-12-23 07:18:40
14618 2005-08-21 18:09:51.000 4490 4490 270 270 2005-08-28 22:47:51.000 1 1 2020-12-23 07:18:49
15620 2005-08-23 07:10:22.000 1173 1173 270 270 2005-08-28 06:51:22.000 2 2 2020-12-23 07:19:04

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