Unix Technical Forum

how many of a kind

This is a discussion on how many of a kind within the MySQL forums, part of the Database Server Software category; --> Stefano Perna <ajajajajai@tin.it> wrote in <4642c037$0$17951$4fafbaef@reader1.news.tin.it>: > subtenante ha scritto: >> Ask MySQL exactly how you asked us : ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 02-28-2008, 10:46 AM
Pavel Lepin
 
Posts: n/a
Default Re: how many of a kind

Stefano Perna <ajajajajai@tin.it> wrote in
<4642c037$0$17951$4fafbaef@reader1.news.tin.it>:
> subtenante ha scritto:
>> Ask MySQL exactly how you asked us :
>>
>> SELECT COUNT(product_name)
>> FROM products
>>
>> where is_active=1
>>
>> GROUP BY cat_id ORDER BY cat_id

>
> one moment:
> is_active is in the categories table (not in products)!


Since you don't seem to know SQL at all, I would recommend
getting some sort of introductory book and reading it
first. Meanwhile hope your team leader doesn't find out
you're not up to snuff.

mysql> select * from categories;
+----+----------+-----------+
| id | cat_type | is_active |
+----+----------+-----------+
| 1 | Washers | 1 |
| 2 | Dryers | 1 |
| 3 | Phones | 1 |
| 4 | Radios | 1 |
| 5 | Gizmos | 0 |
+----+----------+-----------+
5 rows in set (0.00 sec)

mysql> select * from products;
+----+--------------+--------+
| id | product_name | cat_id |
+----+--------------+--------+
| 1 | prod1 | 1 |
| 2 | prod2 | 2 |
| 3 | prod3 | 2 |
| 4 | prod4 | 3 |
| 5 | prod5 | 3 |
+----+--------------+--------+
5 rows in set (0.00 sec)

mysql> select c.cat_type,count(p.product_name) from
categories as c left join products as p on (c.id=p.cat_id)
where c.is_active=1 group by c.id order by c.id;
+----------+-----------------------+
| cat_type | count(p.product_name) |
+----------+-----------------------+
| Washers | 1 |
| Dryers | 2 |
| Phones | 2 |
| Radios | 0 |
+----------+-----------------------+
4 rows in set (0.00 sec)

--
Pavel Lepin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 02-28-2008, 10:46 AM
Stefano Perna
 
Posts: n/a
Default Re: how many of a kind


>
> Since you don't seem to know SQL at all, I would recommend
> getting some sort of introductory book and reading it
> first. Meanwhile hope your team leader doesn't find out
> you're not up to snuff.




Hi, and thanks for your reply. I generally work with client-side
technologies and middleware and the team leader perfectly knows it (!),
this time has been made an exception. In any case, I think you should
learn a little more about good manners.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 02-28-2008, 10:46 AM
strawberry
 
Posts: n/a
Default Re: how many of a kind

On May 10, 9:04 am, Stefano Perna <ajajaja...@tin.it> wrote:
> > Since you don't seem to know SQL at all, I would recommend
> > getting some sort of introductory book and reading it
> > first. Meanwhile hope your team leader doesn't find out
> > you're not up to snuff.

>
> Hi, and thanks for your reply. I generally work with client-side
> technologies and middleware and the team leader perfectly knows it (!),
> this time has been made an exception. In any case, I think you should
> learn a little more about good manners.


On May 10, 9:04 am, Stefano Perna <ajajaja...@tin.it> wrote:
> > Since you don't seem to know SQL at all, I would recommend
> > getting some sort of introductory book and reading it
> > first. Meanwhile hope your team leader doesn't find out
> > you're not up to snuff.

>
> Hi, and thanks for your reply. I generally work with client-side
> technologies and middleware and the team leader perfectly knows it (!),
> this time has been made an exception. In any case, I think you should
> learn a little more about good manners.


Hmm, good manners could include reading the manual.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 02-28-2008, 10:46 AM
Stefano Perna
 
Posts: n/a
Default Re: how many of a kind

strawberry ha scritto:


> Hmm, good manners could include reading the manual.




well, that's true, but I'm not sure reading the manual would help so
much if the resulting query is the (complicated) third one! And, anyway,
if one asks is because he doesn't know or he has not found what he was
lookin for...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 02-28-2008, 10:47 AM
Jerry Stuckle
 
Posts: n/a
Default Re: how many of a kind

Stefano Perna wrote:
> strawberry ha scritto:
>
>
>> Hmm, good manners could include reading the manual.

>
>
>
> well, that's true, but I'm not sure reading the manual would help so
> much if the resulting query is the (complicated) third one! And, anyway,
> if one asks is because he doesn't know or he has not found what he was
> lookin for...


Sorry, I agree with the others. You didn't even try - you just came
running here to get us to do your work for you. Do we get your
paycheck, also?

Most of us here are willing to help those who are trying. But if you
don't even try yourself soon you'll get no answers here.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 02-28-2008, 10:47 AM
Pavel Lepin
 
Posts: n/a
Default Re: how many of a kind

Stefano Perna <ajajajajai@tin.it> wrote in
<4642d209$0$4794$4fafbaef@reader4.news.tin.it>:
>> Since you don't seem to know SQL at all, I would
>> recommend getting some sort of introductory book and
>> reading it first. Meanwhile hope your team leader doesn't
>> find out you're not up to snuff.

>
> In any case, I think you should learn a little
> more about good manners.


Dear Sir,

How kind it is of you to point out my awfully bad manners to
me right after receiving some free advice (which is,
undoubtedly, no more than your just due, since Usenet *is*
a free helpdesk after all) on something you are supposedly
being paid for. Please accept my deepest apologies for
offending your marvellously refined sensibilities, and let
me assure Your Lordship that This Will Not Happen Again.

I remain your humble and most obedient servant--
(indecipherable)

Okay, just kidding, but you already guessed that, didn't
you?

> I generally work with client-side technologies and
> middleware and the team leader perfectly knows it (!),
> this time has been made an exception.


I don't know what kind of team management is practised in
your organisation, but being a leader of a small team
myself, I know that when I assign a task to someone I
expect that either:

1. They're perfectly capable of dealing with the task.

2. They're not capable of dealing with the task at the
moment, but perfectly capable of buying a book/reading a
tutorial, then practising the necessary skills on their own
until they become capable of dealing with the task at hand
under light supervision of someone conversant with that
same set of skills (which is usually me since it's a very
small team).

3. They're not capable of dealing with the task on their
own, but perfectly capable of doing it under mentoring of
someone conversant with the required skills (which is
usually me since it's a very small team).

These three are the more or less workable options in my
experience.

4. They're not capable of dealing with the assigned task, so
instead of getting off their arse and working on it they ask
someone else to do it for them, please, pretty please?

This one is not a workable option, on the other hand. In
fact, if one of my colleagues were doing that, I'd rip him
a new one, then recommend to either fire him or transfer to
a pure management position, where getting others to work
for free is a priceless skill.

--
Pavel Lepin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 02-28-2008, 10:47 AM
Jerry Stuckle
 
Posts: n/a
Default Re: how many of a kind

Pavel Lepin wrote:
> Stefano Perna <ajajajajai@tin.it> wrote in
> <4642d209$0$4794$4fafbaef@reader4.news.tin.it>:
>>> Since you don't seem to know SQL at all, I would
>>> recommend getting some sort of introductory book and
>>> reading it first. Meanwhile hope your team leader doesn't
>>> find out you're not up to snuff.

>> In any case, I think you should learn a little
>> more about good manners.

>
> Dear Sir,
>
> How kind it is of you to point out my awfully bad manners to
> me right after receiving some free advice (which is,
> undoubtedly, no more than your just due, since Usenet *is*
> a free helpdesk after all) on something you are supposedly
> being paid for. Please accept my deepest apologies for
> offending your marvellously refined sensibilities, and let
> me assure Your Lordship that This Will Not Happen Again.
>
> I remain your humble and most obedient servant--
> (indecipherable)
>
> Okay, just kidding, but you already guessed that, didn't
> you?
>
>> I generally work with client-side technologies and
>> middleware and the team leader perfectly knows it (!),
>> this time has been made an exception.

>
> I don't know what kind of team management is practised in
> your organisation, but being a leader of a small team
> myself, I know that when I assign a task to someone I
> expect that either:
>
> 1. They're perfectly capable of dealing with the task.
>
> 2. They're not capable of dealing with the task at the
> moment, but perfectly capable of buying a book/reading a
> tutorial, then practising the necessary skills on their own
> until they become capable of dealing with the task at hand
> under light supervision of someone conversant with that
> same set of skills (which is usually me since it's a very
> small team).
>
> 3. They're not capable of dealing with the task on their
> own, but perfectly capable of doing it under mentoring of
> someone conversant with the required skills (which is
> usually me since it's a very small team).
>
> These three are the more or less workable options in my
> experience.
>
> 4. They're not capable of dealing with the assigned task, so
> instead of getting off their arse and working on it they ask
> someone else to do it for them, please, pretty please?
>
> This one is not a workable option, on the other hand. In
> fact, if one of my colleagues were doing that, I'd rip him
> a new one, then recommend to either fire him or transfer to
> a pure management position, where getting others to work
> for free is a priceless skill.
>



Hear! Hear!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 02-28-2008, 10:47 AM
Joachim Durchholz
 
Posts: n/a
Default Re: how many of a kind

Pavel Lepin schrieb:
> Stefano Perna <ajajajajai@tin.it> wrote in
> <4642d209$0$4794$4fafbaef@reader4.news.tin.it>:
>>> Since you don't seem to know SQL at all, I would
>>> recommend getting some sort of introductory book and
>>> reading it first. Meanwhile hope your team leader doesn't
>>> find out you're not up to snuff.

>> In any case, I think you should learn a little
>> more about good manners.

>
> Dear Sir,
>
> How kind it is of you to point out my awfully bad manners to
> me right after receiving some free advice


Communication in a newsgroup isn't broadband enough to give you enough
information to judge the other person, yet you insist that you can judge
him anyway. Inisisting on gratitude that came over as rudeness adds on
top of that.
I don't know the technical term for this kind of attitude, but it's most
certainly not "good manners".

Regards,
Jo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 02-28-2008, 10:47 AM
Pavel Lepin
 
Posts: n/a
Default OT WAS: Re: how many of a kind

Joachim Durchholz <jo@durchholz.org> wrote in
<f1v4l9$hs$1@online.de>:
> Pavel Lepin schrieb:
>> Stefano Perna <ajajajajai@tin.it> wrote in
>> <4642d209$0$4794$4fafbaef@reader4.news.tin.it>:
>>>> Since you don't seem to know SQL at all, I would
>>>> recommend getting some sort of introductory book and
>>>> reading it first. Meanwhile hope your team leader
>>>> doesn't find out you're not up to snuff.
>>> In any case, I think you should learn a little
>>> more about good manners.

>>
>> Dear Sir,
>>
>> How kind it is of you to point out my awfully bad manners
>> to me right after receiving some free advice

>
> Communication in a newsgroup isn't broadband enough to
> give you enough information to judge the other person, yet
> you insist that you can judge him anyway.


Pardon me, 'judge him'? Can you please explain what you
could possibly mean? My stating that his knowledge/skills
in the field seem nonexistant? Could you perhaps point out
to him that he shouldn't judge my manners on a basis of
just one post? Could you perhaps point out the same thing
to yourself?

> Inisisting on gratitude that came over as rudeness adds on
> top of that.


I don't believe I insisted on OP having to express his
gratitude to me in my posts. In my opinion, the OP clearly
demonstrated in his posts that he doesn't know a thing
about MySQL. I gave him what I consider the best advice
under the circumstances--to read an introductory
book/tutorial on the matter. After that I remarked that his
team leader might not like the fact that he's dabbling in
something he's not qualified for; and that he doesn't seem
to *try* to become qualified. In response, the OP said I
should learn good manners. You seem to know what he meant
by that, so could you please explain to me what kind of
response he expected? Would that be a three-page "Joins
101" lecture, despite the fact that such lectures can be
easily found in precisely the introductory reading I
recommended, and despite the fact that OP's understanding
seems limited enough that perhaps it would be better for
him to start with lectures on even more basic
concepts,--and, mind you, such lectures can be easily found
in precisely the introductory reading I recommended. I
seriously don't get it. What did I do wrong to deserve
a "thank you, you disgustingly rude person" response from
the OP?

> I don't know the technical term for this kind of attitude,
> but it's most certainly not "good manners".


My heart bleeds for good manners.

--
Pavel Lepin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 02-28-2008, 10:47 AM
subtenante
 
Posts: n/a
Default Re: OT WAS: Re: how many of a kind

On Thu, 10 May 2007 16:42:31 +0300, Pavel Lepin <p.lepin@ctncorp.com>
wrote:

> [... A *LOT* of lines ...]


SELECT *
FROM worldwars
WHERE wwID=3;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:03 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com