<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Intrebari</title><link>http://sqlserver.ro/forums/14/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: select mai ciudat.</title><link>http://sqlserver.ro/forums/thread/458.aspx</link><pubDate>Fri, 20 Oct 2006 19:10:40 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:458</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/458.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=458</wfw:commentRss><description>Viteza? Indecsii?</description></item><item><title>Re: select mai ciudat.</title><link>http://sqlserver.ro/forums/thread/453.aspx</link><pubDate>Fri, 20 Oct 2006 11:37:29 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:453</guid><dc:creator>sorinh</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/453.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=453</wfw:commentRss><description>Am rezolvat facind un inner join de genul : 

select distinct
r1.r, r2.r, r3.r, item4
from tabela
inner join (select count( * ) r, item4 from tabela where conditie group by item4) r1 on tabela.item4 = r1.item4 ....
inner join (...) r2 on tabela.item4 = r2.item4</description></item><item><title>Re: select mai ciudat.</title><link>http://sqlserver.ro/forums/thread/445.aspx</link><pubDate>Thu, 19 Oct 2006 10:29:10 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:445</guid><dc:creator>ggciubuc</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/445.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=445</wfw:commentRss><description>&lt;p&gt;Realizati ceva similar cu &lt;/p&gt;&lt;p&gt;select Year,&lt;/p&gt;&lt;p&gt;sum (CASE Quarter WHEN 1 THEN Amount ELSE 0 END) as Trim1,&lt;/p&gt;&lt;p&gt;sum (CASE Quarter WHEN 2 THEN Amount ELSE 0 END) as Trim2,&lt;/p&gt;&lt;p&gt;sum (CASE Quarter WHEN 3 THEN Amount ELSE 0 END) as Trim3,&lt;/p&gt;&lt;p&gt;sum (CASE Quarter WHEN 4 THEN Amount ELSE 0 END) as Trim4&lt;/p&gt;&lt;p&gt;from Northwind.dbo.Tabel&lt;/p&gt;&lt;p&gt;Group by YEAR&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;p&gt;face sumarizare pe trimestre.&lt;/p&gt;&lt;p&gt;Dvs faceti numarare, in conditiile in care item1 are niste valori discrete de un nr. redus.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>select mai ciudat.</title><link>http://sqlserver.ro/forums/thread/441.aspx</link><pubDate>Thu, 19 Oct 2006 10:10:48 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:441</guid><dc:creator>sorinh</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/441.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=441</wfw:commentRss><description>Am nevoie de un select mai ciudat (sql server 2000) care ar fi ceva de genul :


select 
   (select count(item1) from tabela where cond1 as rezultat1), 
   (select count(item2) from tabela where cond2 as rezultat2),
   (select count(item3) from tabela where cond3 as rezultat3),
   item4
from tabela 
group by item4

imi intoarce rezultatele multipilcate. E posibil sa construiesc un astfel de select ? Pe mine ma inteereseaza o sumarizare a rezultatelor pentru fiecare valoare a lui item4.</description></item></channel></rss>