• Definitely would be easier to answer with some sample data and expected outcome, but here's what I've come up with:

    WITH newCustomers

    AS (

    SELECT

    *,

    COUNT(*) OVER (PARTITION BY CustomerID) AS orderCount

    FROM

    dbo.Orders AS O

    WHERE

    /* since PaymentDate is defined as DateTime using this is more consistent

    method then between because with between you'd need to include the time

    portion to be sure you get the full day for most recent date */

    O.PaymentDate >= '2014-07-29' AND

    O.PaymentDate < '2014-08-27'

    )

    SELECT

    *

    FROM

    newCustomers AS NC

    WHERE

    /* the NOT EXISTS enforces that they have not had an order outside the

    date range as well. I'm doing this because I interpreted this,

    "but also taking into account if they have ever had a paid order outside of that date range",

    to mean that you didn't want customers who had an order outside the date range. */

    NOT EXISTS ( SELECT

    1

    FROM

    Orders AS O

    WHERE

    NC.CustomerID = O.CustomerID AND

    (

    O.PaymentDate < '2014-07-29' OR

    O.PaymentDate >= '2014-08-27'

    ) ) AND

    NC.orderCount = 1;