My Sql Query ..

 1. select product_id from products where low_fats = 'Y' && recyclable = 'Y';

2. select name from customer where referee_id !=2 || referee_id is null;

3. select name, population , area from world where area > 3000000 or population > 25000000;

4. select distinct author_id as id from Views

where author_id = viewer_id
order by id;

5.select tweet_id from tweets where char_length(content)>15;

6.select unique_id, name from Employees left join EmployeeUNI on Employees.id = EmployeeUNI.id;

7. select customer_id , count(visits.visit_id) as count_no_trans from visits left join transactions on
visits.visit_id = transactions.visit_id
where transaction_id is null
group by customer_id;
8. SELECT w1.id
FROM Weather w1, Weather w2 WHERE DATEDIFF(w1.recordDate, w2.recordDate) = 1 AND w1.temperature > w2.temperature;

Comments

Popular posts from this blog

Interview question laravel.