Guest User

Untitled

a guest
Sep 29th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. select distinct B.Category,
  2. MAX(IF(tbl_bulkuploadfields.fieldname = 'educationlevel', B.fieldvalue, NULL)) AS educationlevel,
  3. MAX(IF(tbl_bulkuploadfields.fieldname = 'institution_name', B.fieldvalue, NULL)) AS institution_name,
  4. MAX(IF(tbl_bulkuploadfields.fieldname = 'course', B.fieldvalue, NULL)) AS course,
  5. MAX(IF(tbl_bulkuploadfields.fieldname = 'year_of_passing', B.fieldvalue, NULL)) AS year_of_passing,
  6. MAX(IF(tbl_bulkuploadfields.fieldname = 'percentage', B.fieldvalue, NULL)) AS percentage from tbl_bulkuploads B
  7. inner join tbl_bulkuploadfields on tbl_bulkuploadfields.fid = B.fieldname
  8. where B.Category = 1 GROUP BY B.Category
  9.  
  10. select distinct B.Category,
  11. MAX(IF(tbl_bulkuploadfields.fieldname = 'educationlevel', B.fieldvalue, NULL)) AS educationlevel,
  12. MAX(IF(tbl_bulkuploadfields.fieldname = 'institution_name', B.fieldvalue, NULL)) AS institution_name,
  13. MAX(IF(tbl_bulkuploadfields.fieldname = 'course', B.fieldvalue, NULL)) AS course,
  14. MAX(IF(tbl_bulkuploadfields.fieldname = 'year_of_passing', B.fieldvalue, NULL)) AS year_of_passing,
  15. MAX(IF(tbl_bulkuploadfields.fieldname = 'percentage', B.fieldvalue, NULL)) AS percentage from tbl_bulkuploads B
  16. inner join tbl_bulkuploadfields on tbl_bulkuploadfields.fid = B.fieldname
  17. where B.Category = 1 GROUP BY B.Category
  18.  
  19. select distinct B.Category,
  20. MAX(IF(tbl_bulkuploadfields.fieldname = 'educationlevel', B.fieldvalue, NULL)) AS educationlevel,
  21. MAX(IF(tbl_bulkuploadfields.fieldname = 'institution_name', B.fieldvalue, NULL)) AS institution_name,
  22. MAX(IF(tbl_bulkuploadfields.fieldname = 'course', B.fieldvalue, NULL)) AS course,
  23. MAX(IF(tbl_bulkuploadfields.fieldname = 'year_of_passing', B.fieldvalue, NULL)) AS year_of_passing,
  24. MAX(IF(tbl_bulkuploadfields.fieldname = 'percentage', B.fieldvalue, NULL)) AS percentage from tbl_bulkuploads B
  25. inner join tbl_bulkuploadfields on tbl_bulkuploadfields.fid = B.fieldname
  26. where B.Category = 1 GROUP BY B.Category
  27.  
  28. select distinct B.Category,
  29. MAX(IF(tbl_bulkuploadfields.fieldname = 'educationlevel', B.fieldvalue, NULL)) AS educationlevel,
  30. MAX(IF(tbl_bulkuploadfields.fieldname = 'institution_name', B.fieldvalue, NULL)) AS institution_name,
  31. MAX(IF(tbl_bulkuploadfields.fieldname = 'course', B.fieldvalue, NULL)) AS course,
  32. MAX(IF(tbl_bulkuploadfields.fieldname = 'year_of_passing', B.fieldvalue, NULL)) AS year_of_passing,
  33. MAX(IF(tbl_bulkuploadfields.fieldname = 'percentage', B.fieldvalue, NULL)) AS percentage from tbl_bulkuploads B
  34. inner join tbl_bulkuploadfields on tbl_bulkuploadfields.fid = B.fieldname
  35. where B.Category = 1 GROUP BY B.Category
Add Comment
Please, Sign In to add comment