home / sakila

rental

36 rows where customer_id = 348

✎ 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
153 2005-05-26 00:47:47.000 3888 3888 348 348 2005-05-27 21:28:47.000 1 1 2020-12-23 07:15:22
821 2005-05-29 21:31:12.000 3380 3380 348 348 2005-06-04 22:49:12.000 1 1 2020-12-23 07:15:31
1654 2005-06-16 09:42:48.000 1039 1039 348 348 2005-06-20 14:28:48.000 2 2 2020-12-23 07:15:42
2041 2005-06-17 14:19:00.000 782 782 348 348 2005-06-26 08:38:00.000 2 2 2020-12-23 07:15:47
2499 2005-06-18 23:01:36.000 3172 3172 348 348 2005-06-20 21:50:36.000 2 2 2020-12-23 07:15:54
3494 2005-07-05 23:47:30.000 3149 3149 348 348 2005-07-11 18:10:30.000 1 1 2020-12-23 07:16:08
3610 2005-07-06 05:36:59.000 1509 1509 348 348 2005-07-13 07:07:59.000 1 1 2020-12-23 07:16:10
4556 2005-07-08 04:48:41.000 4099 4099 348 348 2005-07-16 08:51:41.000 2 2 2020-12-23 07:16:24
4633 2005-07-08 08:39:39.000 3178 3178 348 348 2005-07-15 10:23:39.000 1 1 2020-12-23 07:16:25
4699 2005-07-08 11:36:56.000 2462 2462 348 348 2005-07-14 11:35:56.000 2 2 2020-12-23 07:16:26
4807 2005-07-08 17:01:48.000 4511 4511 348 348 2005-07-16 22:33:48.000 2 2 2020-12-23 07:16:28
5345 2005-07-09 17:28:18.000 3055 3055 348 348 2005-07-11 14:30:18.000 2 2 2020-12-23 07:16:35
5965 2005-07-10 23:51:52.000 4476 4476 348 348 2005-07-11 23:29:52.000 1 1 2020-12-23 07:16:45
6776 2005-07-12 16:02:09.000 2398 2398 348 348 2005-07-20 16:31:09.000 1 1 2020-12-23 07:16:56
7380 2005-07-27 15:37:01.000 988 988 348 348 2005-08-03 19:24:01.000 1 1 2020-12-23 07:17:05
7482 2005-07-27 19:24:16.000 485 485 348 348 2005-08-05 18:49:16.000 2 2 2020-12-23 07:17:07
7825 2005-07-28 08:34:57.000 4340 4340 348 348 2005-08-06 02:45:57.000 1 1 2020-12-23 07:17:12
8500 2005-07-29 09:12:01.000 4516 4516 348 348 2005-07-31 10:15:01.000 1 1 2020-12-23 07:17:22
8569 2005-07-29 11:39:17.000 276 276 348 348 2005-07-31 07:50:17.000 2 2 2020-12-23 07:17:23
8682 2005-07-29 16:15:26.000 4328 4328 348 348 2005-08-03 20:15:26.000 2 2 2020-12-23 07:17:25
9482 2005-07-30 23:29:16.000 2421 2421 348 348 2005-08-02 20:37:16.000 2 2 2020-12-23 07:17:36
10769 2005-08-01 20:43:02.000 3222 3222 348 348 2005-08-05 02:32:02.000 1 1 2020-12-23 07:17:55
10972 2005-08-02 04:08:25.000 1928 1928 348 348 2005-08-09 23:25:25.000 1 1 2020-12-23 07:17:57
11262 2005-08-02 13:58:55.000 71 71 348 348 2005-08-05 18:09:55.000 2 2 2020-12-23 07:18:01
11429 2005-08-02 20:03:52.000 1098 1098 348 348 2005-08-10 16:38:52.000 2 2 2020-12-23 07:18:04
12564 2005-08-18 15:11:35.000 263 263 348 348 2005-08-22 11:45:35.000 2 2 2020-12-23 07:18:19
12884 2005-08-19 03:34:04.000 2768 2768 348 348 2005-08-28 01:00:04.000 2 2 2020-12-23 07:18:23
12937 2005-08-19 05:25:30.000 3826 3826 348 348 2005-08-22 10:40:30.000 2 2 2020-12-23 07:18:24
13238 2005-08-19 16:20:56.000 985 985 348 348 2005-08-23 15:51:56.000 2 2 2020-12-23 07:18:29
13602 2005-08-20 06:02:02.000 2805 2805 348 348 2005-08-27 04:51:02.000 1 1 2020-12-23 07:18:34
13684 2005-08-20 08:55:53.000 2213 2213 348 348 2005-08-25 08:11:53.000 1 1 2020-12-23 07:18:36
13962 2005-08-20 18:18:06.000 1434 1434 348 348 2005-08-24 22:16:06.000 2 2 2020-12-23 07:18:40
14079 2005-08-20 23:29:25.000 3528 3528 348 348 2005-08-25 04:16:25.000 2 2 2020-12-23 07:18:42
14937 2005-08-22 05:51:59.000 1241 1241 348 348 2005-08-31 01:45:59.000 2 2 2020-12-23 07:18:54
15817 2005-08-23 14:59:51.000 598 598 348 348 2005-08-25 15:27:51.000 1 1 2020-12-23 07:19:07
15944 2005-08-23 18:50:54.000 4559 4559 348 348 2005-08-25 18:04:54.000 2 2 2020-12-23 07:19:08

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