const db = require('../db.js');

module.exports = (self, offSet) => {
  const queryString = `SELECT UserLanguageLevel.User FROM UserLanguageLevel 
                         INNER JOIN LanguageLevel 
                           ON UserLanguageLevel.LanguageLevel = LanguageLevel.id
                         INNER JOIN Language
                           ON LanguageLevel.Language = Language.id
                         INNER JOIN Level
                           ON LanguageLevel.Level = Level.id
                         WHERE Language.name IN (${self.canTeach.map(language => language[0]).join(',')}) AND Level.name IN ('fluent', 'native')
                      `;
  // db.query();
};

@@ -90,60 +90,108 @@
  = %60
+(%0A                        
 SELECT 
-UserL
+users_l
 anguage
-L
+s_l
 evel
-.U
+s.u
 ser 
+AS teach_id 
 FROM 
-UserL
+users_l
 anguage
-L
+s_l
 evel
+s
  %0A  
@@ -224,29 +224,32 @@
 ER JOIN 
-L
+l
 anguage
-L
+s_l
 evel
+s
  %0A      
@@ -276,55 +276,66 @@
  ON 
-UserL
+users_l
 anguage
-L
+s_l
 evel
-.L
+s.l
 anguage
-L
+s_l
 evel
+s
  = 
-L
+l
 anguage
-L
+s_l
 evel
+s
 .id%0A
@@ -370,24 +370,25 @@
 ER JOIN 
-L
+l
 anguage
+s
 %0A       
@@ -410,31 +410,34 @@
      ON 
-L
+l
 anguage
-L
+s_l
 evel
-.L
+s.l
 anguage 
@@ -438,17 +438,17 @@
 guage = 
-L
+l
 anguage.
@@ -486,21 +486,22 @@
 ER JOIN 
-L
+l
 evel
+s
 %0A       
@@ -527,31 +527,34 @@
  ON 
-L
+l
 anguage
-L
+s_l
 evel
-.L
+s.l
 evel = 
-L
+l
 evel
@@ -588,17 +588,17 @@
   WHERE 
-L
+l
 anguage.
@@ -667,17 +667,17 @@
 )%7D) AND 
-L
+l
 evel.nam
@@ -702,16 +702,111 @@
 ative')%0A
+                        ) AS teach%0A                        INNER JOIN%0A                        %0A
         

Refactor to snakecase