home / sakila

rental

46 rows where customer_id = 148

✎ 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
682 2005-05-28 23:53:18.000 3160 3160 148 148 2005-05-29 19:14:18.000 2 2 2020-12-23 07:15:28
1501 2005-06-15 22:02:35.000 1780 1780 148 148 2005-06-23 18:59:35.000 1 1 2020-12-23 07:15:40
1517 2005-06-15 23:20:26.000 3728 3728 148 148 2005-06-23 23:23:26.000 1 1 2020-12-23 07:15:40
2751 2005-06-19 16:39:23.000 1291 1291 148 148 2005-06-25 13:57:23.000 1 1 2020-12-23 07:15:57
2843 2005-06-19 22:36:39.000 1520 1520 148 148 2005-06-26 22:33:39.000 2 2 2020-12-23 07:15:59
2847 2005-06-19 22:54:01.000 1247 1247 148 148 2005-06-27 23:05:01.000 2 2 2020-12-23 07:15:59
3653 2005-07-06 07:45:13.000 2513 2513 148 148 2005-07-10 11:51:13.000 2 2 2020-12-23 07:16:10
4080 2005-07-07 05:09:54.000 1364 1364 148 148 2005-07-11 23:58:54.000 1 1 2020-12-23 07:16:17
4746 2005-07-08 13:47:55.000 173 173 148 148 2005-07-11 09:06:55.000 2 2 2020-12-23 07:16:27
4950 2005-07-08 22:58:07.000 3291 3291 148 148 2005-07-09 20:41:07.000 2 2 2020-12-23 07:16:30
5034 2005-07-09 02:48:15.000 340 340 148 148 2005-07-11 23:13:15.000 2 2 2020-12-23 07:16:31
5372 2005-07-09 18:48:39.000 3551 3551 148 148 2005-07-11 17:40:39.000 1 1 2020-12-23 07:16:36
6169 2005-07-11 10:25:56.000 2781 2781 148 148 2005-07-19 07:18:56.000 2 2 2020-12-23 07:16:47
6640 2005-07-12 10:27:19.000 2794 2794 148 148 2005-07-21 06:28:19.000 2 2 2020-12-23 07:16:54
6793 2005-07-12 16:37:55.000 103 103 148 148 2005-07-21 16:04:55.000 2 2 2020-12-23 07:16:57
7656 2005-07-28 02:07:19.000 178 178 148 148 2005-07-31 04:05:19.000 1 1 2020-12-23 07:17:09
7693 2005-07-28 03:31:22.000 2479 2479 148 148 2005-07-31 06:42:22.000 2 2 2020-12-23 07:17:10
7865 2005-07-28 10:07:04.000 2334 2334 148 148 2005-08-06 08:16:04.000 2 2 2020-12-23 07:17:12
8111 2005-07-28 19:10:03.000 3226 3226 148 148 2005-07-29 22:25:03.000 1 1 2020-12-23 07:17:16
8331 2005-07-29 04:13:29.000 18 18 148 148 2005-08-04 07:09:29.000 1 1 2020-12-23 07:17:19
8394 2005-07-29 06:02:14.000 3933 3933 148 148 2005-08-03 08:15:14.000 1 1 2020-12-23 07:17:20
8578 2005-07-29 11:58:14.000 3737 3737 148 148 2005-08-03 06:25:14.000 1 1 2020-12-23 07:17:23
8626 2005-07-29 14:03:20.000 3092 3092 148 148 2005-08-02 09:05:20.000 1 1 2020-12-23 07:17:24
9023 2005-07-30 05:36:40.000 2911 2911 148 148 2005-08-07 06:20:40.000 1 1 2020-12-23 07:17:30
9106 2005-07-30 08:52:34.000 2935 2935 148 148 2005-08-02 07:38:34.000 2 2 2020-12-23 07:17:31
9530 2005-07-31 01:09:06.000 1718 1718 148 148 2005-08-04 23:47:06.000 2 2 2020-12-23 07:17:37
9594 2005-07-31 03:23:52.000 4382 4382 148 148 2005-08-04 23:06:52.000 1 1 2020-12-23 07:17:38
10067 2005-07-31 19:37:58.000 1940 1940 148 148 2005-08-04 17:32:58.000 2 2 2020-12-23 07:17:45
10830 2005-08-01 23:18:06.000 4176 4176 148 148 2005-08-06 23:15:06.000 2 2 2020-12-23 07:17:55
11357 2005-08-02 17:42:49.000 2644 2644 148 148 2005-08-11 18:14:49.000 1 1 2020-12-23 07:18:03
12029 2005-08-17 20:07:01.000 3516 3516 148 148 2005-08-19 19:36:01.000 2 2 2020-12-23 07:18:12
12038 2005-08-17 20:28:26.000 3794 3794 148 148 2005-08-20 23:09:26.000 2 2 2020-12-23 07:18:12
12512 2005-08-18 13:28:27.000 3959 3959 148 148 2005-08-26 19:08:27.000 2 2 2020-12-23 07:18:18
12944 2005-08-19 05:48:12.000 2956 2956 148 148 2005-08-28 10:10:12.000 1 1 2020-12-23 07:18:24
12983 2005-08-19 07:06:51.000 406 406 148 148 2005-08-28 10:35:51.000 2 2 2020-12-23 07:18:25
14055 2005-08-20 22:18:00.000 1571 1571 148 148 2005-08-22 02:09:00.000 2 2 2020-12-23 07:18:41
14155 2005-08-21 02:31:35.000 769 769 148 148 2005-08-27 06:00:35.000 2 2 2020-12-23 07:18:43
14184 2005-08-21 03:24:50.000 3759 3759 148 148 2005-08-29 01:46:50.000 2 2 2020-12-23 07:18:43
14629 2005-08-21 18:39:52.000 761 761 148 148 2005-08-25 19:14:52.000 2 2 2020-12-23 07:18:49
14713 2005-08-21 21:27:24.000 3350 3350 148 148 2005-08-23 20:26:24.000 1 1 2020-12-23 07:18:51
14879 2005-08-22 03:42:12.000 2154 2154 148 148 2005-08-27 06:14:12.000 1 1 2020-12-23 07:18:53
14965 2005-08-22 06:45:53.000 1036 1036 148 148 2005-08-27 10:05:53.000 1 1 2020-12-23 07:18:54
15237 2005-08-22 17:44:30.000 4485 4485 148 148 2005-08-24 12:51:30.000 1 1 2020-12-23 07:18:58
15379 2005-08-22 22:26:13.000 1899 1899 148 148 2005-08-31 18:19:13.000 1 1 2020-12-23 07:19:00
15541 2005-08-23 04:13:53.000 2762 2762 148 148 2005-08-29 05:51:53.000 1 1 2020-12-23 07:19:03
15586 2005-08-23 05:57:04.000 3232 3232 148 148 2005-08-31 01:59:04.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.534ms