Where is best place for bird table

Hi everyone

Have decided to buy a bird table because the ducks keep eating the food I am putting out for the birds. I don't mind them having some, but lately they are eating it all and keeping the birds from it.

 Is it best to put the bird table in an open space or would it be better in the border by a fence.  Also is it better to get one with a roof on it, bearing in mind last week a sparrowhawk swooped into the garden, I did'nt see it get anything but it is probably about when I am not looking.

Also do pied wagtails go on bird tables, we have got one that visits everyday.

What a wonderful world :))