home / sakila

rental

25 rows where customer_id = 330

✎ 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
704 2005-05-29 02:44:43.000 2628 2628 330 330 2005-06-06 01:51:43.000 2 2 2020-12-23 07:15:29
967 2005-05-30 19:12:06.000 1954 1954 330 330 2005-06-09 00:02:06.000 2 2 2020-12-23 07:15:33
1219 2005-06-15 03:25:59.000 3005 3005 330 330 2005-06-20 00:37:59.000 1 1 2020-12-23 07:15:36
1511 2005-06-15 22:45:06.000 1135 1135 330 330 2005-06-22 22:48:06.000 1 1 2020-12-23 07:15:40
2885 2005-06-20 01:33:42.000 2701 2701 330 330 2005-06-22 22:23:42.000 1 1 2020-12-23 07:15:59
2936 2005-06-20 05:09:27.000 2675 2675 330 330 2005-06-26 10:16:27.000 2 2 2020-12-23 07:16:00
3061 2005-06-20 13:48:21.000 4202 4202 330 330 2005-06-22 17:36:21.000 2 2 2020-12-23 07:16:02
3603 2005-07-06 05:25:03.000 2442 2442 330 330 2005-07-12 08:14:03.000 1 1 2020-12-23 07:16:09
3659 2005-07-06 08:03:14.000 2271 2271 330 330 2005-07-12 09:50:14.000 1 1 2020-12-23 07:16:10
3760 2005-07-06 12:49:28.000 1306 1306 330 330 2005-07-09 16:29:28.000 1 1 2020-12-23 07:16:12
4124 2005-07-07 07:19:54.000 2856 2856 330 330 2005-07-11 05:54:54.000 1 1 2020-12-23 07:16:17
5149 2005-07-09 08:28:23.000 1500 1500 330 330 2005-07-16 06:19:23.000 2 2 2020-12-23 07:16:33
5750 2005-07-10 12:20:41.000 3855 3855 330 330 2005-07-17 08:25:41.000 2 2 2020-12-23 07:16:42
6656 2005-07-12 11:09:47.000 2282 2282 330 330 2005-07-14 05:50:47.000 1 1 2020-12-23 07:16:54
6678 2005-07-12 11:58:36.000 3473 3473 330 330 2005-07-15 17:50:36.000 2 2 2020-12-23 07:16:55
6719 2005-07-12 13:40:37.000 739 739 330 330 2005-07-15 15:23:37.000 2 2 2020-12-23 07:16:55
7894 2005-07-28 10:53:58.000 3532 3532 330 330 2005-08-02 13:42:58.000 2 2 2020-12-23 07:17:13
8680 2005-07-29 16:08:03.000 1227 1227 330 330 2005-07-31 17:26:03.000 1 1 2020-12-23 07:17:25
10100 2005-07-31 20:47:18.000 4050 4050 330 330 2005-08-03 16:58:18.000 2 2 2020-12-23 07:17:45
11259 2005-08-02 13:46:30.000 896 896 330 330 2005-08-07 14:03:30.000 1 1 2020-12-23 07:18:01
11709 2006-02-14 15:16:03.000 1720 1720 330 330   1 1 2020-12-23 07:18:07
12062 2005-08-17 21:24:47.000 1791 1791 330 330 2005-08-20 20:35:47.000 2 2 2020-12-23 07:18:12
12394 2005-08-18 09:05:15.000 3605 3605 330 330 2005-08-23 11:10:15.000 1 1 2020-12-23 07:18:17
12740 2005-08-18 22:17:04.000 1157 1157 330 330 2005-08-23 23:42:04.000 1 1 2020-12-23 07:18:21
12867 2005-08-19 02:40:11.000 4499 4499 330 330 2005-08-20 04:01:11.000 1 1 2020-12-23 07:18:23

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