home / sakila

rental

21 rows where customer_id = 33

✎ 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
165 2005-05-26 02:28:36.000 2735 2735 33 33 2005-06-02 03:21:36.000 1 1 2020-12-23 07:15:22
1301 2005-06-15 09:46:33.000 1484 1484 33 33 2005-06-24 08:56:33.000 2 2 2020-12-23 07:15:37
3173 2005-06-20 22:21:10.000 4306 4306 33 33 2005-06-27 19:41:10.000 2 2 2020-12-23 07:16:03
4095 2005-07-07 06:01:48.000 2900 2900 33 33 2005-07-15 02:52:48.000 2 2 2020-12-23 07:16:17
5421 2005-07-09 20:49:12.000 2437 2437 33 33 2005-07-10 16:30:12.000 1 1 2020-12-23 07:16:37
5723 2005-07-10 11:14:48.000 605 605 33 33 2005-07-11 15:46:48.000 2 2 2020-12-23 07:16:41
6280 2005-07-11 16:36:17.000 4055 4055 33 33 2005-07-13 14:04:17.000 2 2 2020-12-23 07:16:49
7992 2005-07-28 14:53:06.000 1851 1851 33 33 2005-07-29 18:17:06.000 1 1 2020-12-23 07:17:14
9040 2005-07-30 06:31:45.000 392 392 33 33 2005-08-03 12:20:45.000 1 1 2020-12-23 07:17:30
9085 2005-07-30 08:17:24.000 3400 3400 33 33 2005-08-03 09:35:24.000 2 2 2020-12-23 07:17:30
9254 2005-07-30 14:26:11.000 495 495 33 33 2005-08-04 16:12:11.000 1 1 2020-12-23 07:17:33
10335 2005-08-01 04:59:30.000 323 323 33 33 2005-08-05 02:26:30.000 1 1 2020-12-23 07:17:48
10870 2005-08-02 00:27:12.000 1509 1509 33 33 2005-08-02 20:00:12.000 2 2 2020-12-23 07:17:56
12277 2006-02-14 15:16:03.000 407 407 33 33   2 2 2020-12-23 07:18:15
13241 2005-08-19 16:25:00.000 3106 3106 33 33 2005-08-26 12:27:00.000 2 2 2020-12-23 07:18:29
13858 2005-08-20 14:50:57.000 2167 2167 33 33 2005-08-23 12:10:57.000 2 2 2020-12-23 07:18:38
13958 2005-08-20 18:11:44.000 2380 2380 33 33 2005-08-28 14:59:44.000 1 1 2020-12-23 07:18:40
14002 2005-08-20 20:12:19.000 87 87 33 33 2005-08-23 00:23:19.000 1 1 2020-12-23 07:18:41
14623 2005-08-21 18:29:13.000 901 901 33 33 2005-08-26 20:48:13.000 2 2 2020-12-23 07:18:49
15096 2005-08-22 11:43:04.000 1983 1983 33 33 2005-08-29 12:16:04.000 2 2 2020-12-23 07:18:56
15115 2005-08-22 12:28:01.000 1739 1739 33 33 2005-08-26 16:12:01.000 1 1 2020-12-23 07:18:56

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