4

Couple problems on SQL - 244 and 245

 2 years ago
source link: https://www.codeabbey.com/index/forum_topic/a883630e749e4d805c5dcf934fbd21b9
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Couple problems on SQL - 244 and 245

Back to General discussions forum

Rodion (admin)     2021-12-03 08:14:29

Friends, Hi! Here are two first problems on SQL (and feel free to suggest more, since they are often encountered in interviews etc).

Introducing SQL

Aggregations in SQL

There easily could be flaws so feel free to tell about everything which looks suspicious to you.

Sorry for in-site sql runner is quite primitive, perhaps we'll decide to improve it in future.

P.S. I feel that though logically more complex, the second problem may be easier than the first, sorry for that.

Rodion (admin)     2021-12-03 08:35:33

Are we supposed to use only 1 select?

yep, honestly I'm not sure how are you going to combine two selects :) though you can use union probably if you want two.

thanks for hint, I'll add the note to problem statement.

on a single select statement

oops, sorry for this - I'll try to check what may be wrong with it and come back soon

UPD curious thing - it is substring function. it is not recognized by SQLite on server but seems to be ok for SQLite in the web-page. I guess, replace it with substr.

I shall try appending error text if any to error message.

Please login and solve 5 problems to be able to post at forum

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK