home / sakila

rental

24 rows where customer_id = 427

✎ 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
82 2005-05-25 12:17:46.000 1388 1388 427 427 2005-06-01 10:48:46.000 1 1 2020-12-23 07:15:21
1342 2005-06-15 12:26:21.000 4429 4429 427 427 2005-06-22 11:23:21.000 1 1 2020-12-23 07:15:37
1628 2005-06-16 07:52:55.000 868 868 427 427 2005-06-25 11:09:55.000 1 1 2020-12-23 07:15:41
1648 2005-06-16 09:17:07.000 457 457 427 427 2005-06-24 06:31:07.000 2 2 2020-12-23 07:15:41
1857 2005-06-17 01:12:58.000 4257 4257 427 427 2005-06-21 04:49:58.000 1 1 2020-12-23 07:15:45
2466 2005-06-18 20:18:42.000 1356 1356 427 427 2005-06-20 01:32:42.000 1 1 2020-12-23 07:15:53
4793 2005-07-08 16:30:01.000 3090 3090 427 427 2005-07-15 17:56:01.000 1 1 2020-12-23 07:16:27
5476 2005-07-09 23:37:09.000 1199 1199 427 427 2005-07-15 23:57:09.000 1 1 2020-12-23 07:16:37
5586 2005-07-10 04:17:06.000 2965 2965 427 427 2005-07-18 07:11:06.000 1 1 2020-12-23 07:16:39
6423 2005-07-11 23:47:31.000 892 892 427 427 2005-07-19 18:16:31.000 1 1 2020-12-23 07:16:51
6509 2005-07-12 03:35:01.000 2468 2468 427 427 2005-07-13 06:50:01.000 2 2 2020-12-23 07:16:52
6938 2005-07-26 23:16:04.000 2058 2058 427 427 2005-08-05 00:59:04.000 2 2 2020-12-23 07:16:59
8182 2005-07-28 22:19:12.000 4120 4120 427 427 2005-08-01 22:40:12.000 2 2 2020-12-23 07:17:17
8531 2005-07-29 10:26:15.000 1631 1631 427 427 2005-08-06 09:28:15.000 1 1 2020-12-23 07:17:22
8658 2005-07-29 15:16:37.000 2033 2033 427 427 2005-08-07 20:45:37.000 2 2 2020-12-23 07:17:24
9978 2005-07-31 16:59:51.000 2812 2812 427 427 2005-08-06 16:48:51.000 2 2 2020-12-23 07:17:43
10417 2005-08-01 08:10:36.000 3675 3675 427 427 2005-08-02 03:42:36.000 2 2 2020-12-23 07:17:49
10464 2005-08-01 09:43:14.000 464 464 427 427 2005-08-06 09:01:14.000 1 1 2020-12-23 07:17:50
10560 2005-08-01 13:04:57.000 1534 1534 427 427 2005-08-05 18:25:57.000 2 2 2020-12-23 07:17:52
11024 2005-08-02 05:38:31.000 2284 2284 427 427 2005-08-11 04:47:31.000 1 1 2020-12-23 07:17:58
13720 2005-08-20 10:01:39.000 813 813 427 427 2005-08-27 08:26:39.000 1 1 2020-12-23 07:18:36
14201 2005-08-21 03:51:34.000 314 314 427 427 2005-08-30 03:42:34.000 2 2 2020-12-23 07:18:44
14287 2005-08-21 06:53:59.000 2426 2426 427 427 2005-08-25 03:10:59.000 2 2 2020-12-23 07:18:45
15330 2005-08-22 20:35:30.000 689 689 427 427 2005-08-30 21:54:30.000 1 1 2020-12-23 07:19:00

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