home / sakila

rental

34 rows where customer_id = 372

✎ 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
617 2005-05-28 15:49:14.000 4142 4142 372 372 2005-05-31 14:29:14.000 2 2 2020-12-23 07:15:28
638 2005-05-28 18:24:43.000 2685 2685 372 372 2005-06-02 19:03:43.000 2 2 2020-12-23 07:15:28
2315 2005-06-18 09:03:39.000 2766 2766 372 372 2005-06-22 11:18:39.000 1 1 2020-12-23 07:15:51
2959 2005-06-20 07:07:54.000 4185 4185 372 372 2005-06-27 03:31:54.000 1 1 2020-12-23 07:16:00
3283 2005-06-21 06:19:07.000 3988 3988 372 372 2005-06-26 10:59:07.000 2 2 2020-12-23 07:16:05
5229 2005-07-09 12:30:18.000 4472 4472 372 372 2005-07-14 15:31:18.000 2 2 2020-12-23 07:16:34
5314 2005-07-09 16:05:28.000 3770 3770 372 372 2005-07-10 18:18:28.000 1 1 2020-12-23 07:16:35
5352 2005-07-09 17:54:58.000 908 908 372 372 2005-07-15 16:20:58.000 1 1 2020-12-23 07:16:36
5501 2005-07-10 00:33:48.000 3979 3979 372 372 2005-07-17 02:58:48.000 1 1 2020-12-23 07:16:38
5914 2005-07-10 21:01:12.000 2639 2639 372 372 2005-07-16 18:27:12.000 2 2 2020-12-23 07:16:44
6692 2005-07-12 12:35:39.000 2837 2837 372 372 2005-07-20 11:20:39.000 2 2 2020-12-23 07:16:55
7190 2005-07-27 08:36:01.000 1330 1330 372 372 2005-07-30 08:32:01.000 2 2 2020-12-23 07:17:03
7234 2005-07-27 10:08:45.000 3873 3873 372 372 2005-07-31 13:58:45.000 1 1 2020-12-23 07:17:03
7735 2005-07-28 05:09:56.000 3949 3949 372 372 2005-07-31 23:34:56.000 2 2 2020-12-23 07:17:11
8009 2005-07-28 15:25:58.000 337 337 372 372 2005-08-04 10:16:58.000 2 2 2020-12-23 07:17:14
8059 2005-07-28 17:09:59.000 2611 2611 372 372 2005-07-31 15:42:59.000 2 2 2020-12-23 07:17:15
8358 2005-07-29 05:00:58.000 1449 1449 372 372 2005-08-01 02:49:58.000 2 2 2020-12-23 07:17:20
8724 2005-07-29 18:05:21.000 898 898 372 372 2005-08-01 15:41:21.000 1 1 2020-12-23 07:17:25
8755 2005-07-29 19:18:31.000 1498 1498 372 372 2005-07-31 19:20:31.000 2 2 2020-12-23 07:17:26
8837 2005-07-29 22:49:00.000 42 42 372 372 2005-08-07 21:56:00.000 2 2 2020-12-23 07:17:27
9128 2005-07-30 09:51:14.000 3647 3647 372 372 2005-08-07 06:23:14.000 1 1 2020-12-23 07:17:31
11134 2005-08-02 09:19:22.000 2641 2641 372 372 2005-08-11 03:56:22.000 1 1 2020-12-23 07:17:59
11438 2005-08-02 20:21:08.000 1040 1040 372 372 2005-08-10 22:12:08.000 1 1 2020-12-23 07:18:04
11555 2005-08-17 01:08:59.000 2569 2569 372 372 2005-08-18 06:09:59.000 2 2 2020-12-23 07:18:05
12224 2005-08-18 02:59:09.000 1781 1781 372 372 2005-08-19 06:22:09.000 1 1 2020-12-23 07:18:14
12714 2005-08-18 21:08:01.000 868 868 372 372 2005-08-27 17:09:01.000 2 2 2020-12-23 07:18:21
13402 2005-08-19 22:16:53.000 3264 3264 372 372 2005-08-22 22:28:53.000 1 1 2020-12-23 07:18:31
13871 2005-08-20 15:10:13.000 3206 3206 372 372 2005-08-29 19:43:13.000 2 2 2020-12-23 07:18:39
14037 2005-08-20 21:35:58.000 3655 3655 372 372 2005-08-29 23:06:58.000 2 2 2020-12-23 07:18:41
14211 2005-08-21 04:29:11.000 300 300 372 372 2005-08-24 02:50:11.000 2 2 2020-12-23 07:18:44
14331 2005-08-21 08:29:38.000 3128 3128 372 372 2005-08-29 13:18:38.000 2 2 2020-12-23 07:18:45
14770 2005-08-21 23:47:16.000 2977 2977 372 372 2005-08-25 04:48:16.000 1 1 2020-12-23 07:18:51
15041 2005-08-22 09:43:18.000 1913 1913 372 372 2005-08-23 11:04:18.000 2 2 2020-12-23 07:18:55
15563 2005-08-23 05:08:58.000 170 170 372 372 2005-08-24 04:24:58.000 1 1 2020-12-23 07:19:03

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