home / sakila

rental

27 rows where customer_id = 280

✎ 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
1014 2005-05-31 02:39:16.000 766 766 280 280 2005-06-01 06:03:16.000 2 2 2020-12-23 07:15:33
2656 2005-06-19 10:42:33.000 559 559 280 280 2005-06-24 08:31:33.000 2 2 2020-12-23 07:15:56
3009 2005-06-20 10:24:44.000 2721 2721 280 280 2005-06-23 13:39:44.000 1 1 2020-12-23 07:16:01
3097 2005-06-20 16:26:14.000 4337 4337 280 280 2005-06-23 14:46:14.000 1 1 2020-12-23 07:16:02
4616 2005-07-08 07:48:12.000 2580 2580 280 280 2005-07-10 08:13:12.000 2 2 2020-12-23 07:16:25
6851 2005-07-12 19:32:14.000 664 664 280 280 2005-07-17 21:03:14.000 1 1 2020-12-23 07:16:57
7070 2005-07-27 04:01:08.000 4182 4182 280 280 2005-07-30 08:10:08.000 2 2 2020-12-23 07:17:01
7901 2005-07-28 11:12:12.000 4435 4435 280 280 2005-08-01 08:13:12.000 1 1 2020-12-23 07:17:13
8319 2005-07-29 03:44:52.000 747 747 280 280 2005-08-01 00:35:52.000 2 2 2020-12-23 07:17:19
8365 2005-07-29 05:11:00.000 53 53 280 280 2005-07-30 05:30:00.000 2 2 2020-12-23 07:17:20
8565 2005-07-29 11:35:23.000 3211 3211 280 280 2005-08-06 08:28:23.000 1 1 2020-12-23 07:17:23
8695 2005-07-29 16:44:55.000 694 694 280 280 2005-08-07 12:47:55.000 1 1 2020-12-23 07:17:25
8744 2005-07-29 18:58:24.000 1086 1086 280 280 2005-08-05 17:56:24.000 1 1 2020-12-23 07:17:26
8912 2005-07-30 01:31:25.000 1686 1686 280 280 2005-08-02 07:14:25.000 2 2 2020-12-23 07:17:28
9103 2005-07-30 08:49:26.000 3806 3806 280 280 2005-07-31 14:15:26.000 1 1 2020-12-23 07:17:31
10847 2005-08-01 23:49:33.000 1200 1200 280 280 2005-08-10 05:37:33.000 2 2 2020-12-23 07:17:56
11366 2005-08-02 18:01:25.000 3583 3583 280 280 2005-08-11 15:02:25.000 1 1 2020-12-23 07:18:03
11517 2005-08-16 23:56:28.000 4266 4266 280 280 2005-08-21 22:40:28.000 1 1 2020-12-23 07:18:05
12053 2005-08-17 20:57:27.000 4448 4448 280 280 2005-08-20 19:51:27.000 1 1 2020-12-23 07:18:12
12849 2005-08-19 02:05:37.000 3489 3489 280 280 2005-08-23 07:00:37.000 1 1 2020-12-23 07:18:23
13231 2005-08-19 16:12:49.000 2126 2126 280 280 2005-08-27 17:14:49.000 2 2 2020-12-23 07:18:29
13321 2005-08-19 19:40:37.000 4183 4183 280 280 2005-08-21 19:09:37.000 2 2 2020-12-23 07:18:30
13667 2005-08-20 08:25:34.000 3856 3856 280 280 2005-08-24 07:04:34.000 2 2 2020-12-23 07:18:35
15036 2005-08-22 09:36:00.000 874 874 280 280 2005-08-23 08:12:00.000 2 2 2020-12-23 07:18:55
15312 2005-08-22 19:58:15.000 2509 2509 280 280 2005-08-25 19:21:15.000 2 2 2020-12-23 07:18:59
15554 2005-08-23 04:48:12.000 198 198 280 280 2005-08-29 05:11:12.000 1 1 2020-12-23 07:19:03
15950 2005-08-23 19:09:39.000 1374 1374 280 280 2005-08-31 17:03:39.000 2 2 2020-12-23 07:19:09

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