April 26, 2013

SQL, MY SQL, T-SQL Interview Mostly Asked Question’s

Question (1): simple select query from multiple table using join’s ? The Query is SELECT sg.username,lg.user_id,lg.login_date FROM `sign-up` AS sg LEFT JOIN `log-in` as lg on sg.id=lg.user_id; Question (2): get lasttime login date of each user ? The Query is SELECT sg.username,sg.id, max(lg.login_date) as lastlogin FROM `sign-up` AS sg LEFT JOIN `log-in` as lg on […]