2 votes 2 votes Find SQL :- (Q17) Compute increments for the ratings of persons who have sailed two different boats on the same day. (Q18) Find the ages of sailors whose name begins and ends with B and has at least three characters. Databases databases sql + – Rishi yadav asked Sep 8, 2017 Rishi yadav 3.1k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply akash.dinkar12 commented Sep 8, 2017 reply Follow Share 18. select age from sailor where sname like 'B__%B; 0 votes 0 votes Rishi yadav commented Sep 8, 2017 reply Follow Share Can u plz explan 'B__%B; 0 votes 0 votes Akash Verma 1 commented Sep 20, 2017 reply Follow Share Here are some examples showing different LIKE operators with '%' and '_' wildcards: LIKE Operator Description WHERE CustomerName LIKE 'a%' Finds any values that starts with "a" WHERE CustomerName LIKE '%a' Finds any values that ends with "a" WHERE CustomerName LIKE '%or%' Finds any values that have "or" in any position WHERE CustomerName LIKE '_r%' Finds any values that have "r" in the second position WHERE CustomerName LIKE 'a_%_%' Finds any values that starts with "a" and are at least 3 characters in length WHERE ContactName LIKE 'a%o' Finds any values that starts with "a" and ends with "o" WHERE ContactName LIKE'B__%B' Begins and ends with B and has at least three characters Now, you will get it. 0 votes 0 votes Please log in or register to add a comment.
Best answer 2 votes 2 votes For first question.... 1.SELECT rating+1 FROM Sailor WHERE sid IN (SELECT sid FROM R2 GROUP BY date,sid HAVING COUNT(*)=2) and for second.... @akash.dinkar12 comments hs_yadav answered Sep 8, 2017 • selected Sep 11, 2017 by Rishi yadav hs_yadav comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Q18> select S.age from sailors S where sname LIKE 'b_%b'; NOTE: if asked atleast 2 characters = 'b%b' , if asked exactly 3 characters, 'b_b' smelly indian answered Sep 10, 2017 smelly indian comment Share Follow See all 0 reply Please log in or register to add a comment.