Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
What was the duration of Robert Joy's portrayal?

### Inputs:
table_name: table, columns: ['Character', 'Portrayed by', 'First appearance', 'Last appearance', 'Duration', 'Episodes']

### Response:
SELECT COUNT Duration FROM table WHERE Portrayed by = Robert Joy