473,804 Members | 3,453 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is expert SQL knowledge?

I do a lot of hiring for my company and a lot of the people I interview
say that they are experts at SQL queries, but when I give them something
simple just beyond the typical SELECT type of queries, they choke.

For example I have a table that looks like this:

PK_ID - primary key
PARENT_ID - a FK to another row in the same table

This essentially is a tree structure. I will ask interviewees to write
a query that will return all the rows that have 2 direct children. No
one knows how to do this.

I don't get it. I have done queries which boggle the mind and they are
far more complex than this.

Am I asking too much?
--
* Don Vaillancourt
Director of Software Development
*
*WEB IMPACT INC.*
phone: 416-815-2000 ext. 245
fax: 416-815-2001
email: do**@web-impact.com <mailto:do**@we bimpact.com>
web: http://www.web-impact.com

/ This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
/
Jul 23 '05 #1
15 1505
I don't know what lever programmer you are interviewing for but I
have a BC in IS and have been working in the field for about 4yr

My answer would be yes and no

No, it is a simple query

Select PK_ID
from <table name>
where PK_ID in
(
select Parent_ID from <table name> group by Parent_ID having count(*)
= 2
)

Yes, if I was nervous in a job interview I would probably fail the test

But I'm sure your not basing your decision solely on this criteria.
Good luck
Rick

Jul 23 '05 #2
For interviews, I personally like written tests. I think it is a more
objective measure of sql mastery.

???
select c.*
from tbl c
join
(
select a.pk_id
from tbl a
join tbl b
on a.parent_id = b.pk_id
group by a.pk_id
having count(*)=2
) d
on c.pk_id = d.pk_id

Jul 23 '05 #3
I am not not basing my decision only on this. As long as they show an
effort and are very close to solving it, then I would consider that good.

But I have had programmers telling me they were experts, yet never think
of using subqueries or aggregate functions. Yet, do great in other
parts of the written test which are not SQL based.

I even had one programmer who over-programmed his query.
--
* Don Vaillancourt
Director of Software Development
*
*WEB IMPACT INC.*
phone: 416-815-2000 ext. 245
fax: 416-815-2001
email: do**@web-impact.com <mailto:do**@we bimpact.com>
web: http://www.web-impact.com

/ This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
/
Jul 23 '05 #4
I would never claim to be an expert, and it only took me a few minutes
to figure it out. So yes, if that's the case I would bust there
balls. I have come across several cocky programmers that think they
know it all. It has been my experience that programmers that can admit
that they don't know everything but are still willing to learn
typically are
easier to work with.

Jul 23 '05 #5
You may not consider yourself an expert, nor do I, but I'm sure you
would be well equipped to handle most complex queries. And understand
enough to know what you need to research to complete your task.

I've managed to take fairly complex queries that involved subqueries and
converted them to be used on MySQL where subqueries were not supported
not long ago.

--
* Don Vaillancourt
Director of Software Development
*
*WEB IMPACT INC.*
phone: 416-815-2000 ext. 245
fax: 416-815-2001
email: do**@web-impact.com <mailto:do**@we bimpact.com>
web: http://www.web-impact.com

/ This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
/
Jul 23 '05 #6
nib
Don Vaillancourt wrote:
I do a lot of hiring for my company and a lot of the people I interview
say that they are experts at SQL queries, but when I give them something
simple just beyond the typical SELECT type of queries, they choke.

For example I have a table that looks like this:

PK_ID - primary key
PARENT_ID - a FK to another row in the same table

This essentially is a tree structure. I will ask interviewees to write
a query that will return all the rows that have 2 direct children. No
one knows how to do this.

I don't get it. I have done queries which boggle the mind and they are
far more complex than this.

Am I asking too much?


First, I don't throw the term "expert" around lightly. Usually when
people call themselves experts they don't realize that they don't know
enough about the subject matter to know they aren't an expert. ;)

As to your specific point. I've been working in SQL for many, many years
(back from 6.0) but in all my years have never had to deal with a
hierarchy type query. I'd likely fail your test. However, I can work out
just about every query I need to, know where to go when I can't and am
probably more well versed in "proper" MS SQL programming than most
people that call themselves experts. I don't consider myself an expert.

Just my .02

Zach
Jul 23 '05 #7
The term 'expert' as you know is difficult to justify. It's far easier
to look at qualifications and experience, but I've seen some very
experienced people make the simplest of mistakes. I've spent a few
years re-working a previous developers work as it was very poor and yet
he probably has more experience than me. Would I call myself an expert
? Probably not. I'd leave that to my colleagues to decide. Have I got
anything seriously wrong ? Never. Would I take on any challenge ? Yes,
absolutely. However, when I talk to the people on the forum, I realise
that there is still a lot to learn and understand.

By the way, your question was very simple. I generally work with
complex queries with a lot of tables so I personally would find this
very easy. I do, however, come back here for advice from time to time
just for a little guidance as it's always good to make sure you are on
the right track.

Ryan

p.s. MVP is always a good indicator :-)

Don Vaillancourt wrote:
I do a lot of hiring for my company and a lot of the people I interview say that they are experts at SQL queries, but when I give them something simple just beyond the typical SELECT type of queries, they choke.

For example I have a table that looks like this:

PK_ID - primary key
PARENT_ID - a FK to another row in the same table

This essentially is a tree structure. I will ask interviewees to write a query that will return all the rows that have 2 direct children. No one knows how to do this.

I don't get it. I have done queries which boggle the mind and they are far more complex than this.

Am I asking too much?
--
* Don Vaillancourt
Director of Software Development
*
*WEB IMPACT INC.*
phone: 416-815-2000 ext. 245
fax: 416-815-2001
email: do**@web-impact.com <mailto:do**@we bimpact.com>
web: http://www.web-impact.com

/ This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
/


Jul 23 '05 #8
Actually, that's a good point. Maybe I should provide another kind of
test which is still as complex, but based on a different hierarchy.

nib wrote:
As to your specific point. I've been working in SQL for many, many years
(back from 6.0) but in all my years have never had to deal with a
hierarchy type query. I'd likely fail your test.

--
* Don Vaillancourt
Director of Software Development
*
*WEB IMPACT INC.*
phone: 416-815-2000 ext. 245
fax: 416-815-2001
email: do**@web-impact.com <mailto:do**@we bimpact.com>
web: http://www.web-impact.com

/ This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
/
Jul 23 '05 #9
Sorry, what's MVP?
--
* Don Vaillancourt
Director of Software Development
*
*WEB IMPACT INC.*
phone: 416-815-2000 ext. 245
fax: 416-815-2001
email: do**@web-impact.com <mailto:do**@we bimpact.com>
web: http://www.web-impact.com

/ This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
/
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

125
14866
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
72
5905
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for example, between a C/C++ programmers with a few weeks of experience and a C/C++ programmer with years of experience. You don't really need to understand the subtle details or use the obscure features of either language
26
3674
by: puzzlecracker | last post by:
It'd be interesting to compare the learning practices of c++ practitioners. I'll start with mine The C++ Programming Language C++ Primer Effective C++ More Effective C++ Effective STL The C++ Standard Library : A Tutorial and Reference (most of it) Exceptional C++
8
1412
by: utkarsh.tandon | last post by:
Hi everyone. I'm new to this group. I'm also a newbie to the world of programming, and I needed some advice. I started programming with Python (thanks to ESR) and after finishing one tutorial I gained enough knowledge to make small programs and device my own algorithms. Then one of my friends who is an expert programmer gave me the advice to shift to C. So I picked up this book on C by Kernighan and Ritchie. I've completed the book and...
0
1132
by: felics60 | last post by:
Lack of knowledge about computers and its accessories is a big problem if one doesn't know their subtleties and intricacies. I have been searching for these informations lately and I found that one good source are expert reviews. Yes, expert reviews. I realized that aside from the detailed specifications, reviews contain the most useful information that is difficult to obtain, the pros and cons, the good and the bad. These will inform us...
65
3617
by: Aditya | last post by:
Hi I am using a line of as char recvedValues = {'\0'}; in my code. I get a warning as near initialization for recvedValues. I am using gcc 3.4 Can anybody please explain the meaning. Thanks Aditya
7
5464
by: Val Paliy | last post by:
Hello, everyone -- I have in mind an expert system, but the problem is I program in C#, and my partner - in C++. If she writes an algorithm in C++, can VS 2008 Express Edition convert it to C# afterwards? I want the application to be cross-platform, that's why C# was chosen as the main language. Appreciate any feedback! Thank you!
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9576
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10567
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7613
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5515
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.