Use order to get the first record since postgresql returns in the
desired order