home / sakila

rental

29 rows where customer_id = 265

✎ 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
74 2005-05-25 11:09:48.000 1744 1744 265 265 2005-05-26 12:23:48.000 2 2 2020-12-23 07:15:21
2027 2005-06-17 13:06:56.000 4309 4309 265 265 2005-06-23 13:46:56.000 1 1 2020-12-23 07:15:47
2562 2005-06-19 03:15:05.000 51 51 265 265 2005-06-21 08:26:05.000 2 2 2020-12-23 07:15:55
2598 2005-06-19 05:59:57.000 2079 2079 265 265 2005-06-24 11:44:57.000 2 2 2020-12-23 07:15:55
3823 2005-07-06 15:41:27.000 124 124 265 265 2005-07-09 09:48:27.000 1 1 2020-12-23 07:16:13
4610 2005-07-08 07:28:05.000 1279 1279 265 265 2005-07-14 02:10:05.000 1 1 2020-12-23 07:16:25
4797 2005-07-08 16:39:05.000 1389 1389 265 265 2005-07-09 11:41:05.000 1 1 2020-12-23 07:16:28
5029 2005-07-09 02:35:32.000 3938 3938 265 265 2005-07-17 22:46:32.000 1 1 2020-12-23 07:16:31
5417 2005-07-09 20:34:09.000 3569 3569 265 265 2005-07-14 00:36:09.000 2 2 2020-12-23 07:16:37
5710 2005-07-10 10:32:52.000 2843 2843 265 265 2005-07-18 06:28:52.000 1 1 2020-12-23 07:16:41
6068 2005-07-11 04:41:09.000 2331 2331 265 265 2005-07-14 04:45:09.000 1 1 2020-12-23 07:16:46
6371 2005-07-11 21:31:51.000 4297 4297 265 265 2005-07-16 23:10:51.000 1 1 2020-12-23 07:16:50
6553 2005-07-12 05:06:39.000 1137 1137 265 265 2005-07-21 10:37:39.000 1 1 2020-12-23 07:16:53
6921 2005-07-12 22:39:03.000 3322 3322 265 265 2005-07-21 18:54:03.000 2 2 2020-12-23 07:16:58
7414 2005-07-27 16:46:07.000 3276 3276 265 265 2005-08-02 20:04:07.000 1 1 2020-12-23 07:17:06
7704 2005-07-28 04:02:13.000 2342 2342 265 265 2005-08-04 00:51:13.000 1 1 2020-12-23 07:17:10
8278 2005-07-29 01:42:55.000 768 768 265 265 2005-08-05 01:55:55.000 2 2 2020-12-23 07:17:19
8489 2005-07-29 08:58:03.000 375 375 265 265 2005-08-02 07:50:03.000 2 2 2020-12-23 07:17:22
8665 2005-07-29 15:39:29.000 1113 1113 265 265 2005-08-01 10:33:29.000 2 2 2020-12-23 07:17:24
9416 2005-07-30 20:52:45.000 1470 1470 265 265 2005-08-02 17:38:45.000 2 2 2020-12-23 07:17:35
10592 2005-08-01 14:13:00.000 829 829 265 265 2005-08-09 13:03:00.000 2 2 2020-12-23 07:17:52
11000 2005-08-02 04:56:14.000 264 264 265 265 2005-08-07 01:39:14.000 2 2 2020-12-23 07:17:58
12207 2005-08-18 02:24:07.000 3745 3745 265 265 2005-08-22 07:53:07.000 1 1 2020-12-23 07:18:14
12346 2005-08-18 07:17:55.000 1200 1200 265 265 2005-08-21 11:35:55.000 2 2 2020-12-23 07:18:16
13700 2005-08-20 09:26:17.000 4229 4229 265 265 2005-08-27 05:49:17.000 2 2 2020-12-23 07:18:36
14125 2005-08-21 01:32:16.000 2174 2174 265 265 2005-08-26 00:09:16.000 1 1 2020-12-23 07:18:42
14547 2005-08-21 15:51:38.000 1172 1172 265 265 2005-08-26 15:35:38.000 1 1 2020-12-23 07:18:48
14556 2005-08-21 16:03:27.000 475 475 265 265 2005-08-29 15:49:27.000 1 1 2020-12-23 07:18:49
14943 2005-08-22 05:59:59.000 3515 3515 265 265 2005-08-26 10:31:59.000 2 2 2020-12-23 07:18:54

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