---
# System prepended metadata

title: Fix Sql Queries

---

# Fix Sql Queries
```sql=
export const getAllDonationSql = `
SELECT 
     donation_items.donation_id,
    user_profiles.uid AS creator_uid,
    user_profiles.first_name || ' ' || user_profiles.last_name AS creator_name,
    title,
    donation_items.description,
    target_nominal,
    img_url,
    donation_items.status
FROM
    donation_items
INNER JOIN user_profiles ON donation_items.uid = user_profiles.uid
WHERE status = $1
LIMIT $2
OFFSET $3
`;

```