• Please avoid posting these sort of misleading questions.

    select CategoryID, Quantity, Price

    from Customer c, SalesOrderDetail sod

    where sod.clientid in (select customerid where pricingplan='X')

    works even without customerid in any of the table but not the intended result.

    If any table has customerid. eg: customer table has customerid then alias name should be there otherwise gives ambigous column

    select CategoryID, Quantity, Price

    from Customer c, SalesOrderDetail sod

    where sod.clientid in (select c.customerid where pricingplan='X')