home / sakila

rental

19 rows where customer_id = 378

✎ 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
347 2005-05-27 04:40:33.000 1625 1625 378 378 2005-05-28 09:56:33.000 2 2 2020-12-23 07:15:24
1623 2005-06-16 07:48:50.000 4485 4485 378 378 2005-06-17 03:53:50.000 2 2 2020-12-23 07:15:41
1662 2005-06-16 10:13:35.000 3552 3552 378 378 2005-06-23 13:54:35.000 1 1 2020-12-23 07:15:42
2134 2005-06-17 21:13:44.000 1699 1699 378 378 2005-06-26 16:28:44.000 2 2 2020-12-23 07:15:49
2713 2005-06-19 14:23:09.000 3979 3979 378 378 2005-06-20 17:55:09.000 1 1 2020-12-23 07:15:57
3759 2005-07-06 12:46:38.000 4165 4165 378 378 2005-07-10 11:31:38.000 1 1 2020-12-23 07:16:12
4755 2005-07-08 14:23:41.000 661 661 378 378 2005-07-10 19:35:41.000 1 1 2020-12-23 07:16:27
5578 2005-07-10 04:00:31.000 4543 4543 378 378 2005-07-16 08:06:31.000 2 2 2020-12-23 07:16:39
6233 2005-07-11 14:10:47.000 3731 3731 378 378 2005-07-15 15:13:47.000 2 2 2020-12-23 07:16:48
7888 2005-07-28 10:40:24.000 545 545 378 378 2005-08-01 16:18:24.000 1 1 2020-12-23 07:17:13
8740 2005-07-29 18:41:31.000 3781 3781 378 378 2005-08-01 18:38:31.000 1 1 2020-12-23 07:17:26
9668 2005-07-31 06:31:03.000 1647 1647 378 378 2005-08-07 06:19:03.000 2 2 2020-12-23 07:17:39
9868 2005-07-31 13:20:08.000 266 266 378 378 2005-08-01 18:17:08.000 2 2 2020-12-23 07:17:42
10917 2005-08-02 02:06:18.000 3146 3146 378 378 2005-08-03 22:42:18.000 1 1 2020-12-23 07:17:57
11111 2005-08-02 08:21:27.000 334 334 378 378 2005-08-06 07:48:27.000 2 2 2020-12-23 07:17:59
12596 2005-08-18 16:29:35.000 3662 3662 378 378 2005-08-24 16:48:35.000 1 1 2020-12-23 07:18:19
12828 2005-08-19 01:37:47.000 4208 4208 378 378 2005-08-24 22:31:47.000 2 2 2020-12-23 07:18:23
14502 2005-08-21 14:22:28.000 2986 2986 378 378 2005-08-23 10:40:28.000 1 1 2020-12-23 07:18:48
14971 2005-08-22 06:52:49.000 1883 1883 378 378 2005-08-28 06:27:49.000 2 2 2020-12-23 07:18:54

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