There's two ways I can think of, but Its not clear if you want the total duration to be > 0.5 or select individual records of duration > 0.5 (and sum those looking at your code)
In the first instance, I would look at this
PostgreSQL: Documentation: 8.1: Aggregate Functions[
^], in the second, well surely you can add the 'and duration ... ' clause to your query