home / sakila

rental

22 rows where customer_id = 55

✎ 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
555 2005-05-28 08:31:14.000 4397 4397 55 55 2005-05-30 07:34:14.000 2 2 2020-12-23 07:15:27
1027 2005-05-31 03:46:19.000 2718 2718 55 55 2005-06-09 03:50:19.000 1 1 2020-12-23 07:15:33
1048 2005-05-31 06:49:53.000 2811 2811 55 55 2005-06-02 11:33:53.000 1 1 2020-12-23 07:15:34
1825 2005-06-16 21:53:05.000 2908 2908 55 55 2005-06-20 17:22:05.000 2 2 2020-12-23 07:15:44
2062 2005-06-17 15:56:43.000 1749 1749 55 55 2005-06-20 21:37:43.000 2 2 2020-12-23 07:15:48
2904 2005-06-20 02:54:06.000 2195 2195 55 55 2005-06-21 06:57:06.000 2 2 2020-12-23 07:15:59
2976 2005-06-20 08:09:11.000 4210 4210 55 55 2005-06-21 10:45:11.000 1 1 2020-12-23 07:16:00
3149 2005-06-20 20:34:55.000 3295 3295 55 55 2005-06-21 18:51:55.000 1 1 2020-12-23 07:16:03
4671 2005-07-08 10:15:32.000 2139 2139 55 55 2005-07-14 08:19:32.000 2 2 2020-12-23 07:16:26
6314 2005-07-11 18:32:44.000 4128 4128 55 55 2005-07-17 23:58:44.000 1 1 2020-12-23 07:16:49
7050 2005-07-27 03:33:17.000 1135 1135 55 55 2005-08-02 03:12:17.000 1 1 2020-12-23 07:17:00
8288 2005-07-29 02:04:22.000 1822 1822 55 55 2005-08-05 04:21:22.000 2 2 2020-12-23 07:17:19
9302 2005-07-30 16:34:57.000 2326 2326 55 55 2005-07-31 11:08:57.000 2 2 2020-12-23 07:17:34
9596 2005-07-31 03:28:47.000 2847 2847 55 55 2005-08-04 03:43:47.000 2 2 2020-12-23 07:17:38
9798 2005-07-31 10:55:18.000 3759 3759 55 55 2005-08-01 07:37:18.000 2 2 2020-12-23 07:17:41
11287 2005-08-02 14:49:51.000 927 927 55 55 2005-08-09 09:19:51.000 2 2 2020-12-23 07:18:01
12776 2005-08-18 23:37:33.000 2345 2345 55 55 2005-08-23 03:07:33.000 1 1 2020-12-23 07:18:22
12808 2005-08-19 00:40:41.000 3920 3920 55 55 2005-08-21 06:39:41.000 2 2 2020-12-23 07:18:22
12972 2005-08-19 06:43:28.000 1218 1218 55 55 2005-08-27 11:30:28.000 1 1 2020-12-23 07:18:25
13345 2005-08-19 20:25:24.000 47 47 55 55 2005-08-27 20:38:24.000 1 1 2020-12-23 07:18:30
14667 2005-08-21 19:51:11.000 2608 2608 55 55 2005-08-23 17:37:11.000 1 1 2020-12-23 07:18:50
15296 2005-08-22 19:37:20.000 2715 2715 55 55 2005-08-24 15:16:20.000 1 1 2020-12-23 07:18:59

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