Clientes y ventas no contactadas

Javier Prieto 1 Reputation point
2022-06-11T22:26:57.067+00:00

Hola, tengo el siguiente problema que resolver: escriba una consulta que devolverá una lista de todos los clientes y sus facturas. devolver solo las filas donde las facturas fueron creadas por un usuario que nunca contactó a ese cliente en particular

Estoy trabado en como filtrar porque los clientes van a ser contactados por usuarios, pero yo solo tengo que mostrar a los que vendieron y no los contactaron, por ahora tengo esto

SELECT c.customer_name, i.invoice_number
FROM customer AS c
INNER JOIN invoice ON c.id = i.customer_id
INNER JOIN user_account as ua ON i.user_accound_id = ua.id
WHERE i.user_account_id NOT IN
(SELECT user_account_id FROM contact)

Gracias

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
41,438 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-06-11T22:31:11.053+00:00

    Q&A forums are currently English only. I'd try asking for help over here in dedicated forums.
    https://social.msdn.microsoft.com/Forums/es-es/home
    https://social.technet.microsoft.com/Forums/es-es/home
    https://answers.microsoft.com/es-es

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.