home / sakila

rental

21 rows where customer_id = 413

✎ 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
40 2005-05-25 05:09:04.000 2638 2638 413 413 2005-05-27 23:12:04.000 1 1 2020-12-23 07:15:20
999 2005-05-31 00:25:10.000 4433 4433 413 413 2005-06-03 06:05:10.000 2 2 2020-12-23 07:15:33
2130 2005-06-17 21:00:44.000 1369 1369 413 413 2005-06-26 00:05:44.000 2 2 2020-12-23 07:15:49
2545 2005-06-19 02:23:36.000 3237 3237 413 413 2005-06-20 03:17:36.000 2 2 2020-12-23 07:15:55
3762 2005-07-06 12:52:49.000 1941 1941 413 413 2005-07-12 11:41:49.000 1 1 2020-12-23 07:16:12
4491 2005-07-08 01:30:46.000 1168 1168 413 413 2005-07-11 03:12:46.000 1 1 2020-12-23 07:16:23
5897 2005-07-10 20:16:14.000 740 740 413 413 2005-07-19 15:49:14.000 2 2 2020-12-23 07:16:44
7100 2005-07-27 05:05:01.000 4224 4224 413 413 2005-07-28 23:12:01.000 2 2 2020-12-23 07:17:01
7635 2005-07-28 01:08:11.000 55 55 413 413 2005-08-01 03:32:11.000 2 2 2020-12-23 07:17:09
7731 2005-07-28 05:01:18.000 1533 1533 413 413 2005-07-29 02:22:18.000 1 1 2020-12-23 07:17:11
10909 2005-08-02 01:53:59.000 3516 3516 413 413 2005-08-03 04:36:59.000 2 2 2020-12-23 07:17:56
11304 2005-08-02 15:40:10.000 2592 2592 413 413 2005-08-06 16:12:10.000 2 2 2020-12-23 07:18:02
11468 2005-08-02 21:47:26.000 3168 3168 413 413 2005-08-05 02:30:26.000 2 2 2020-12-23 07:18:04
11532 2005-08-17 00:34:14.000 1947 1947 413 413 2005-08-22 19:37:14.000 2 2 2020-12-23 07:18:05
12552 2005-08-18 14:46:34.000 4303 4303 413 413 2005-08-20 11:02:34.000 2 2 2020-12-23 07:18:19
13010 2005-08-19 07:52:21.000 825 825 413 413 2005-08-27 12:51:21.000 1 1 2020-12-23 07:18:25
13318 2005-08-19 19:33:57.000 1389 1389 413 413 2005-08-21 17:52:57.000 2 2 2020-12-23 07:18:30
13824 2005-08-20 13:43:12.000 2845 2845 413 413 2005-08-22 17:26:12.000 1 1 2020-12-23 07:18:38
13887 2005-08-20 15:39:00.000 4002 4002 413 413 2005-08-24 16:17:00.000 2 2 2020-12-23 07:18:39
14773 2005-08-21 23:50:57.000 2541 2541 413 413 2005-08-26 04:45:57.000 2 2 2020-12-23 07:18:51
15678 2005-08-23 09:23:45.000 1345 1345 413 413 2005-08-27 11:38:45.000 2 2 2020-12-23 07:19:04

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.023ms