home / sakila

rental

31 rows where customer_id = 279

✎ 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
979 2005-05-30 21:37:11.000 3917 3917 279 279 2005-06-08 00:24:11.000 2 2 2020-12-23 07:15:33
1019 2005-05-31 03:05:07.000 3975 3975 279 279 2005-06-03 08:34:07.000 1 1 2020-12-23 07:15:33
1178 2005-06-15 00:36:40.000 2553 2553 279 279 2005-06-21 00:27:40.000 2 2 2020-12-23 07:15:35
2147 2005-06-17 22:28:13.000 2752 2752 279 279 2005-06-22 20:50:13.000 1 1 2020-12-23 07:15:49
3215 2005-06-21 01:11:32.000 4140 4140 279 279 2005-06-26 19:42:32.000 1 1 2020-12-23 07:16:04
3374 2005-06-21 13:36:30.000 1067 1067 279 279 2005-06-23 15:10:30.000 2 2 2020-12-23 07:16:06
3375 2005-06-21 13:37:18.000 912 912 279 279 2005-06-22 11:26:18.000 2 2 2020-12-23 07:16:06
4476 2005-07-08 00:34:25.000 395 395 279 279 2005-07-08 22:55:25.000 1 1 2020-12-23 07:16:23
4978 2005-07-09 00:22:02.000 2578 2578 279 279 2005-07-18 04:37:02.000 1 1 2020-12-23 07:16:30
5248 2005-07-09 13:29:44.000 246 246 279 279 2005-07-12 18:12:44.000 1 1 2020-12-23 07:16:34
5361 2005-07-09 18:15:32.000 2045 2045 279 279 2005-07-17 23:32:32.000 2 2 2020-12-23 07:16:36
6176 2005-07-11 10:48:21.000 2969 2969 279 279 2005-07-12 15:54:21.000 2 2 2020-12-23 07:16:47
7947 2005-07-28 13:05:50.000 2504 2504 279 279 2005-08-02 11:16:50.000 2 2 2020-12-23 07:17:14
8559 2005-07-29 11:25:54.000 2078 2078 279 279 2005-08-04 10:16:54.000 2 2 2020-12-23 07:17:23
9820 2005-07-31 11:46:57.000 499 499 279 279 2005-08-08 13:35:57.000 1 1 2020-12-23 07:17:41
10177 2005-07-31 23:42:33.000 2242 2242 279 279 2005-08-03 01:30:33.000 2 2 2020-12-23 07:17:46
11250 2005-08-02 13:35:42.000 2223 2223 279 279 2005-08-10 12:32:42.000 2 2 2020-12-23 07:18:01
11515 2005-08-16 23:54:34.000 1053 1053 279 279 2005-08-21 19:00:34.000 1 1 2020-12-23 07:18:05
11703 2005-08-17 07:19:29.000 1692 1692 279 279 2005-08-20 09:35:29.000 2 2 2020-12-23 07:18:07
12935 2005-08-19 05:20:25.000 193 193 279 279 2005-08-21 03:10:25.000 2 2 2020-12-23 07:18:24
12949 2005-08-19 05:55:52.000 4209 4209 279 279 2005-08-23 00:01:52.000 1 1 2020-12-23 07:18:24
13105 2005-08-19 11:06:16.000 729 729 279 279 2005-08-27 15:21:16.000 1 1 2020-12-23 07:18:27
13233 2005-08-19 16:14:41.000 1057 1057 279 279 2005-08-24 21:13:41.000 1 1 2020-12-23 07:18:29
13538 2006-02-14 15:16:03.000 581 581 279 279   1 1 2020-12-23 07:18:33
13588 2005-08-20 05:47:11.000 702 702 279 279 2005-08-28 02:45:11.000 2 2 2020-12-23 07:18:34
14206 2005-08-21 03:59:26.000 860 860 279 279 2005-08-26 03:52:26.000 1 1 2020-12-23 07:18:44
14714 2005-08-21 21:27:43.000 1 1 279 279 2005-08-30 22:26:43.000 1 1 2020-12-23 07:18:51
14779 2005-08-22 00:00:56.000 1087 1087 279 279 2005-08-31 00:01:56.000 2 2 2020-12-23 07:18:51
14789 2005-08-22 00:29:39.000 2344 2344 279 279 2005-08-25 02:25:39.000 1 1 2020-12-23 07:18:52
15580 2005-08-23 05:39:06.000 754 754 279 279 2005-09-01 01:14:06.000 2 2 2020-12-23 07:19:03
15606 2005-08-23 06:50:27.000 1811 1811 279 279 2005-08-28 04:23:27.000 2 2 2020-12-23 07:19:03

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