home / sakila

rental

31 rows where customer_id = 78

✎ 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
2207 2005-06-18 02:19:21.000 182 182 78 78 2005-06-24 02:25:21.000 2 2 2020-12-23 07:15:50
2949 2005-06-20 06:05:53.000 375 375 78 78 2005-06-29 03:19:53.000 2 2 2020-12-23 07:16:00
3248 2005-06-21 03:12:21.000 3656 3656 78 78 2005-06-28 03:54:21.000 2 2 2020-12-23 07:16:04
3593 2005-07-06 04:39:52.000 619 619 78 78 2005-07-11 23:20:52.000 2 2 2020-12-23 07:16:09
4227 2005-07-07 12:41:36.000 4186 4186 78 78 2005-07-15 12:33:36.000 1 1 2020-12-23 07:16:19
4627 2005-07-08 08:24:39.000 2383 2383 78 78 2005-07-13 11:04:39.000 2 2 2020-12-23 07:16:25
4778 2005-07-08 15:51:51.000 611 611 78 78 2005-07-12 16:58:51.000 2 2 2020-12-23 07:16:27
5078 2005-07-09 05:20:24.000 1994 1994 78 78 2005-07-13 06:41:24.000 2 2 2020-12-23 07:16:32
5604 2005-07-10 05:05:00.000 3702 3702 78 78 2005-07-12 08:04:00.000 1 1 2020-12-23 07:16:39
6005 2005-07-11 01:36:42.000 809 809 78 78 2005-07-14 04:47:42.000 2 2 2020-12-23 07:16:45
6344 2005-07-11 20:04:43.000 3074 3074 78 78 2005-07-18 14:35:43.000 2 2 2020-12-23 07:16:50
7200 2005-07-27 08:57:38.000 4406 4406 78 78 2005-08-02 12:29:38.000 2 2 2020-12-23 07:17:03
7747 2005-07-28 05:50:11.000 1775 1775 78 78 2005-08-03 09:51:11.000 1 1 2020-12-23 07:17:11
7926 2005-07-28 12:13:02.000 180 180 78 78 2005-08-05 08:54:02.000 1 1 2020-12-23 07:17:13
7957 2005-07-28 13:34:08.000 1623 1623 78 78 2005-08-05 07:58:08.000 1 1 2020-12-23 07:17:14
8920 2005-07-30 01:59:24.000 4079 4079 78 78 2005-08-02 22:37:24.000 2 2 2020-12-23 07:17:28
9068 2005-07-30 07:31:45.000 2264 2264 78 78 2005-08-08 06:40:45.000 1 1 2020-12-23 07:17:30
10350 2005-08-01 05:30:05.000 2067 2067 78 78 2005-08-05 09:59:05.000 1 1 2020-12-23 07:17:48
10590 2005-08-01 14:11:53.000 740 740 78 78 2005-08-04 20:04:53.000 1 1 2020-12-23 07:17:52
10831 2005-08-01 23:22:45.000 1496 1496 78 78 2005-08-07 01:05:45.000 2 2 2020-12-23 07:17:55
10942 2005-08-02 03:16:31.000 2304 2304 78 78 2005-08-11 02:46:31.000 2 2 2020-12-23 07:17:57
12474 2005-08-18 12:10:03.000 2240 2240 78 78 2005-08-27 17:05:03.000 1 1 2020-12-23 07:18:18
12653 2005-08-18 18:53:17.000 3353 3353 78 78 2005-08-26 14:08:17.000 1 1 2020-12-23 07:18:20
13124 2005-08-19 11:55:59.000 2105 2105 78 78 2005-08-26 06:01:59.000 2 2 2020-12-23 07:18:27
13432 2005-08-19 23:29:06.000 2216 2216 78 78 2005-08-23 00:57:06.000 1 1 2020-12-23 07:18:32
13792 2005-08-20 12:21:37.000 4157 4157 78 78 2005-08-27 14:28:37.000 1 1 2020-12-23 07:18:37
14620 2005-08-21 18:10:43.000 3272 3272 78 78 2005-08-22 15:19:43.000 2 2 2020-12-23 07:18:49
14716 2005-08-21 21:29:55.000 2285 2285 78 78 2005-08-23 18:34:55.000 2 2 2020-12-23 07:18:51
14810 2005-08-22 01:08:34.000 1982 1982 78 78 2005-08-25 07:00:34.000 2 2 2020-12-23 07:18:52
14862 2005-08-22 02:51:41.000 3479 3479 78 78 2005-08-28 06:30:41.000 2 2 2020-12-23 07:18:53
16039 2005-08-23 22:18:51.000 545 545 78 78 2005-08-31 19:55:51.000 2 2 2020-12-23 07:19:10

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