home / sakila

rental

30 rows where customer_id = 299

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, last_update, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
332 2005-05-27 02:27:10.000 1529 1529 299 299 2005-06-03 01:26:10.000 2 2 2020-12-23 07:15:24
606 2005-05-28 14:48:39.000 3509 3509 299 299 2005-06-04 09:44:39.000 2 2 2020-12-23 07:15:27
1650 2005-06-16 09:23:20.000 4125 4125 299 299 2005-06-23 11:25:20.000 1 1 2020-12-23 07:15:41
2664 2005-06-19 11:11:23.000 3496 3496 299 299 2005-06-28 08:30:23.000 2 2 2020-12-23 07:15:56
2774 2005-06-19 18:05:11.000 2809 2809 299 299 2005-06-21 16:21:11.000 2 2 2020-12-23 07:15:58
2791 2005-06-19 18:51:27.000 2174 2174 299 299 2005-06-22 19:35:27.000 2 2 2020-12-23 07:15:58
3074 2005-06-20 14:41:41.000 1441 1441 299 299 2005-06-21 15:56:41.000 1 1 2020-12-23 07:16:02
3223 2005-06-21 02:06:45.000 1033 1033 299 299 2005-06-22 07:16:45.000 2 2 2020-12-23 07:16:04
3288 2005-06-21 06:36:59.000 1961 1961 299 299 2005-06-30 06:50:59.000 1 1 2020-12-23 07:16:05
3497 2005-07-06 00:00:03.000 1970 1970 299 299 2005-07-09 01:27:03.000 1 1 2020-12-23 07:16:08
4153 2005-07-07 08:53:08.000 2185 2185 299 299 2005-07-11 05:09:08.000 2 2 2020-12-23 07:16:18
4350 2005-07-07 19:02:41.000 2223 2223 299 299 2005-07-09 15:27:41.000 1 1 2020-12-23 07:16:21
5033 2005-07-09 02:42:01.000 2841 2841 299 299 2005-07-14 00:29:01.000 1 1 2020-12-23 07:16:31
5642 2005-07-10 06:46:08.000 3630 3630 299 299 2005-07-13 10:03:08.000 1 1 2020-12-23 07:16:40
6732 2005-07-12 13:58:51.000 1913 1913 299 299 2005-07-17 17:42:51.000 1 1 2020-12-23 07:16:56
6853 2005-07-12 19:38:11.000 4006 4006 299 299 2005-07-20 00:14:11.000 1 1 2020-12-23 07:16:57
7264 2005-07-27 11:18:58.000 2391 2391 299 299 2005-08-03 07:43:58.000 2 2 2020-12-23 07:17:04
7746 2005-07-28 05:48:56.000 176 176 299 299 2005-08-04 07:33:56.000 1 1 2020-12-23 07:17:11
7862 2005-07-28 10:02:25.000 2507 2507 299 299 2005-08-05 13:10:25.000 1 1 2020-12-23 07:17:12
9520 2005-07-31 00:50:54.000 1306 1306 299 299 2005-08-04 20:05:54.000 1 1 2020-12-23 07:17:37
10201 2005-08-01 00:42:18.000 3649 3649 299 299 2005-08-08 20:49:18.000 2 2 2020-12-23 07:17:46
10440 2005-08-01 08:54:32.000 842 842 299 299 2005-08-02 10:59:32.000 2 2 2020-12-23 07:17:50
11629 2005-08-17 04:27:24.000 786 786 299 299 2005-08-26 10:25:24.000 2 2 2020-12-23 07:18:06
11746 2005-08-17 09:03:24.000 4571 4571 299 299 2005-08-25 06:08:24.000 2 2 2020-12-23 07:18:08
11998 2005-08-17 18:46:21.000 4258 4258 299 299 2005-08-18 20:29:21.000 1 1 2020-12-23 07:18:11
13069 2005-08-19 09:55:20.000 368 368 299 299 2005-08-24 04:10:20.000 2 2 2020-12-23 07:18:26
14208 2005-08-21 04:09:18.000 4180 4180 299 299 2005-08-22 03:29:18.000 1 1 2020-12-23 07:18:44
14548 2005-08-21 15:53:52.000 226 226 299 299 2005-08-25 15:39:52.000 2 2 2020-12-23 07:18:48
14889 2005-08-22 04:10:10.000 1579 1579 299 299 2005-08-24 06:23:10.000 2 2 2020-12-23 07:18:53
14898 2005-08-22 04:26:34.000 1736 1736 299 299 2005-08-31 10:04:34.000 1 1 2020-12-23 07:18:53

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