sql select statement

Este proyecto recibió 78 ofertas de freelancers talentosos con una oferta promedio de £112 GBP.

Obtén cotizaciones gratis para un proyecto como este
Presupuesto de Proyecto
£10 - £20 GBP
Ofertas Totales
Descripción del Proyecto

Hi, I need a small SQL statement written. I know it's pretty simple via sub query or something, but I can't get my head around it.

The general idea is that I will mail people who have not been mailed before, or it has been over 30 days. The comms routine already has it's own resending process, hence, we care about is_complete.

You will not have access to my database. I have two tables:


rgid = int

... etc


rgid = int

is_complete (0/1)

updated (UTC integer)

... etc


1. You can have more than one comms per ghost.

2. There may not be any comms for a ghost.

I need to return a distinct list of ghosts (the whole row, not just the rgid) where:

1. no comms exists at all yet OR

2. comms exist, but all of them are is_complete=1 and the most recent comms is updated over 30 days ago.

Habilidades Requeridas

Buscando hacer algo de dinero?

  • Establece tu presupuesto y período de tiempo
  • Describe tu propuesta
  • Consigue pago por tu trabajo

Contrata Freelancers que también oferten en este proyecto

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online