home / sakila

rental

31 rows where customer_id = 309

✎ 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
218 2005-05-26 09:27:09.000 2291 2291 309 309 2005-06-04 11:53:09.000 2 2 2020-12-23 07:15:22
723 2005-05-29 05:34:44.000 3407 3407 309 309 2005-05-30 05:50:44.000 1 1 2020-12-23 07:15:29
1837 2005-06-16 23:16:15.000 1259 1259 309 309 2005-06-21 21:54:15.000 1 1 2020-12-23 07:15:44
2560 2005-06-19 03:12:42.000 3340 3340 309 309 2005-06-28 02:28:42.000 1 1 2020-12-23 07:15:55
2644 2005-06-19 09:42:30.000 1923 1923 309 309 2005-06-27 07:23:30.000 2 2 2020-12-23 07:15:56
2688 2005-06-19 12:50:56.000 4281 4281 309 309 2005-06-28 17:58:56.000 2 2 2020-12-23 07:15:57
3837 2005-07-06 16:27:43.000 3166 3166 309 309 2005-07-07 18:02:43.000 1 1 2020-12-23 07:16:13
3896 2005-07-06 19:09:15.000 1755 1755 309 309 2005-07-16 00:52:15.000 2 2 2020-12-23 07:16:14
4172 2005-07-07 09:49:09.000 1158 1158 309 309 2005-07-11 15:14:09.000 2 2 2020-12-23 07:16:18
4540 2005-07-08 04:03:28.000 4160 4160 309 309 2005-07-13 03:31:28.000 2 2 2020-12-23 07:16:24
5305 2005-07-09 15:55:36.000 625 625 309 309 2005-07-18 15:59:36.000 1 1 2020-12-23 07:16:35
5980 2005-07-11 00:18:21.000 1777 1777 309 309 2005-07-14 21:26:21.000 1 1 2020-12-23 07:16:45
6480 2005-07-12 01:49:29.000 3076 3076 309 309 2005-07-17 01:00:29.000 1 1 2020-12-23 07:16:52
7214 2005-07-27 09:23:33.000 802 802 309 309 2005-08-03 13:14:33.000 2 2 2020-12-23 07:17:03
7722 2005-07-28 04:44:58.000 3828 3828 309 309 2005-07-30 01:29:58.000 1 1 2020-12-23 07:17:11
7846 2005-07-28 09:21:18.000 4201 4201 309 309 2005-08-06 07:10:18.000 2 2 2020-12-23 07:17:12
8341 2005-07-29 04:42:01.000 4208 4208 309 309 2005-08-04 00:58:01.000 1 1 2020-12-23 07:17:19
8501 2005-07-29 09:12:51.000 1052 1052 309 309 2005-07-30 11:19:51.000 2 2 2020-12-23 07:17:22
8681 2005-07-29 16:12:01.000 4004 4004 309 309 2005-08-01 18:14:01.000 2 2 2020-12-23 07:17:25
8917 2005-07-30 01:47:02.000 4460 4460 309 309 2005-08-05 21:10:02.000 2 2 2020-12-23 07:17:28
9945 2005-07-31 15:47:51.000 2075 2075 309 309 2005-08-02 19:06:51.000 1 1 2020-12-23 07:17:43
9949 2005-07-31 15:50:10.000 3258 3258 309 309 2005-08-01 17:53:10.000 2 2 2020-12-23 07:17:43
10458 2005-08-01 09:19:48.000 1500 1500 309 309 2005-08-02 10:16:48.000 1 1 2020-12-23 07:17:50
10728 2005-08-01 19:15:09.000 3133 3133 309 309 2005-08-04 19:35:09.000 1 1 2020-12-23 07:17:54
10818 2005-08-01 22:52:45.000 4549 4549 309 309 2005-08-06 04:07:45.000 1 1 2020-12-23 07:17:55
11964 2005-08-17 17:37:03.000 2225 2225 309 309 2005-08-25 11:55:03.000 2 2 2020-12-23 07:18:11
13021 2005-08-19 08:08:04.000 1242 1242 309 309 2005-08-26 12:04:04.000 2 2 2020-12-23 07:18:26
13502 2005-08-20 01:58:15.000 1324 1324 309 309 2005-08-21 20:21:15.000 1 1 2020-12-23 07:18:33
13909 2005-08-20 16:26:36.000 1508 1508 309 309 2005-08-21 20:59:36.000 2 2 2020-12-23 07:18:39
14846 2005-08-22 02:13:48.000 3840 3840 309 309 2005-08-30 05:39:48.000 1 1 2020-12-23 07:18:52
15422 2005-08-22 23:58:09.000 2601 2601 309 309 2005-08-30 19:03:09.000 2 2 2020-12-23 07:19:01

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