Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

105
Visualizações
I have to make changes in a logic where it fetches data from MySQL using certain conditions and I'm not sure how to do it?

Okay so first

async getPRMsAvailability() {
  var prmsData = await getManager().query(
    'SELECT SQL_NO_CACHE prm.id, prm.firstName, prm.lastName, COUNT(student.id) as students FROM prm LEFT JOIN student ON prm.id = student.prm_id group by prm.id order by count(student.id) asc limit 1'
  );

  return prmsData;
}

This is the code that is already present in my file what this code does is from the prm table it takes id, firstname, lastname and assigns it to the total count of student ids present in student table the only change I want here is that it should also consider the status column from the student table and only consider it for those students whose status(student.status) is active and not all students.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda