home / sakila

rental

32 rows where customer_id = 254

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
183 2005-05-26 05:01:18.000 2877 2877 254 254 2005-06-01 09:04:18.000 1 1 2020-12-23 07:15:22
1108 2005-05-31 15:05:12.000 2562 2562 254 254 2005-06-09 19:48:12.000 2 2 2020-12-23 07:15:34
1285 2005-06-15 08:33:06.000 1054 1054 254 254 2005-06-19 07:36:06.000 1 1 2020-12-23 07:15:37
1390 2005-06-15 16:06:29.000 4502 4502 254 254 2005-06-19 13:11:29.000 1 1 2020-12-23 07:15:38
2082 2005-06-17 17:13:32.000 434 434 254 254 2005-06-19 16:16:32.000 1 1 2020-12-23 07:15:48
2138 2005-06-17 21:28:14.000 512 512 254 254 2005-06-22 01:16:14.000 2 2 2020-12-23 07:15:49
2687 2005-06-19 12:46:52.000 3152 3152 254 254 2005-06-23 06:58:52.000 2 2 2020-12-23 07:15:57
3882 2005-07-06 18:38:21.000 788 788 254 254 2005-07-09 14:55:21.000 1 1 2020-12-23 07:16:14
5042 2005-07-09 03:20:30.000 3609 3609 254 254 2005-07-15 07:22:30.000 1 1 2020-12-23 07:16:31
5072 2005-07-09 05:01:58.000 94 94 254 254 2005-07-18 08:17:58.000 2 2 2020-12-23 07:16:32
5080 2005-07-09 05:23:55.000 635 635 254 254 2005-07-11 05:56:55.000 2 2 2020-12-23 07:16:32
5537 2005-07-10 02:35:41.000 1781 1781 254 254 2005-07-13 07:11:41.000 2 2 2020-12-23 07:16:38
5550 2005-07-10 02:58:35.000 1905 1905 254 254 2005-07-16 02:38:35.000 2 2 2020-12-23 07:16:39
5826 2005-07-10 16:21:02.000 4104 4104 254 254 2005-07-17 21:08:02.000 1 1 2020-12-23 07:16:43
5930 2005-07-10 21:59:32.000 2338 2338 254 254 2005-07-11 18:40:32.000 2 2 2020-12-23 07:16:44
7011 2005-07-27 01:58:34.000 4082 4082 254 254 2005-07-28 06:11:34.000 1 1 2020-12-23 07:17:00
7413 2005-07-27 16:45:40.000 2909 2909 254 254 2005-07-31 12:02:40.000 1 1 2020-12-23 07:17:06
8216 2005-07-28 23:43:59.000 2211 2211 254 254 2005-08-06 05:05:59.000 1 1 2020-12-23 07:17:18
8581 2005-07-29 12:02:06.000 2102 2102 254 254 2005-08-02 10:32:06.000 2 2 2020-12-23 07:17:23
9494 2005-07-30 23:52:46.000 3799 3799 254 254 2005-08-05 23:13:46.000 2 2 2020-12-23 07:17:36
10522 2005-08-01 11:48:51.000 4159 4159 254 254 2005-08-05 12:40:51.000 1 1 2020-12-23 07:17:51
11190 2005-08-02 11:21:34.000 922 922 254 254 2005-08-05 05:23:34.000 1 1 2020-12-23 07:18:00
11665 2005-08-17 05:36:57.000 334 334 254 254 2005-08-23 01:38:57.000 1 1 2020-12-23 07:18:07
12148 2005-08-18 00:13:15.000 2409 2409 254 254 2005-08-20 01:27:15.000 2 2 2020-12-23 07:18:13
12206 2005-08-18 02:22:20.000 3275 3275 254 254 2005-08-23 05:36:20.000 1 1 2020-12-23 07:18:14
12247 2005-08-18 03:51:51.000 2264 2264 254 254 2005-08-24 05:36:51.000 2 2 2020-12-23 07:18:15
12874 2005-08-19 03:07:57.000 848 848 254 254 2005-08-22 22:42:57.000 2 2 2020-12-23 07:18:23
13001 2005-08-19 07:36:44.000 2505 2505 254 254 2005-08-22 13:06:44.000 1 1 2020-12-23 07:18:25
13045 2005-08-19 09:17:35.000 389 389 254 254 2005-08-23 12:04:35.000 1 1 2020-12-23 07:18:26
13130 2005-08-19 12:06:42.000 2006 2006 254 254 2005-08-23 12:08:42.000 1 1 2020-12-23 07:18:27
14497 2005-08-21 14:09:47.000 3240 3240 254 254 2005-08-22 11:10:47.000 2 2 2020-12-23 07:18:48
15774 2005-08-23 13:25:08.000 1273 1273 254 254 2005-08-28 10:08:08.000 2 2 2020-12-23 07:19:06

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