A good book to practise SQL queries

Hi all,
Does any one know a good book/websource to master/practise sql queries especially complex joins?
If yes please let me know.
thanks
Rajiv

http://www.bookpool.com/sm/0977671542
Plenty of complex joins there: Counting with theta joins (as opposed to analytics), self joins, set containment joins (aka relational division)...

Similar Messages

  • Any good book on Rewriting SQLs for tuning purposes?

    Is there any good book explaining how to rewrite Oracle SQLs in an optimal way?

    Gosh, where to start...
    In addition to the resources above, any or all of the books below would contribute significantly in their own way to such knowledge:
    [Dan Tow: SQL Tuning|http://www.amazon.com/SQL-Tuning-Dan-Tow/dp/0596005733/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1241014515&sr=8-1]
    [Jonathan Lewis: Cost-Based Optimizer Fundamentals|http://www.amazon.com/SQL-Tuning-Dan-Tow/dp/0596005733/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1241014515&sr=8-1]
    [Tom Kyte: Effective Oracle By Design|http://www.amazon.com/Effective-Oracle-Design-Osborne-ORACLE/dp/0072230657/ref=sr_1_5?ie=UTF8&s=books&qid=1241015035&sr=1-5]
    [Christian Antognini: Troubleshooting Oracle Performance|http://www.amazon.com/Effective-Oracle-Design-Osborne-ORACLE/dp/0072230657/ref=sr_1_5?ie=UTF8&s=books&qid=1241015035&sr=1-5]

  • Good book containing practical excercies on Oracle SQL

    Hello All,
    I have lately become quite comfortable with SQL queries.
    I want to put more hands on Oracle SQL queries and its syntax.
    Wanted to know if there is any good book containing ample of exercises/assignments on basic Oracle SQL.

    http://www.oracle.com/technology/tech/pl_sql/index.html
    Open the above link and read "PL/SQL Books". Here you will get Sample Chapter PDFs, download them, read and do practice.
    http://www.amazon.com/exec/obidos/tg/detail/-/0131172611/ref=ase_oracleinternetse/103-8555306-4675857?v=glance&s=books
    is also a good PL/SQL exmple.
    HTH
    Girish Sharma
    "Mark the reply if it is helpful/Correct; else post your further queries. Do'nt let question unanswered."

  • Can someone suggest some good books for sql reporting services (SSRS) 2012 or above?

    Hi Everyone,
        Can someone suggest some good books for sql reporting services (SSRS) 2012 and above? I ave been working on ssrs for past 2 months and have a basic understanding of ssrs.
    Regards
    Regards

    Hi,
    you can look for below options;
    http://www.amazon.in/Microsoft-Server-Reporting-Services-Recipes/dp/0470563117#reader_0470563117
    http://www.goodreads.com/book/show/18147604-learning-sql-server-reporting-services-2012
    Thanks
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. http://techequation.com

  • Good book for SQL Powershell????

    Can anyone suggest me a good book on SQL Powershel??? I am really in need of one... I am a SQL Developer and was given some tasks that are making me use powershell :-(

    Hello,
    The SQL Server snapin for PowerShell is one out of a few hundret; I dont't think you will find a dedicated book for it.
    But in Internet you can find a lot of article about PowerShell for SQL Server. You can start at MSDN here:
    SQL Server PowerShell
    Also a good resource:
    MS Script Center Gallery with PowerShell scripts for SQL Server
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Good book for learning pl/sql quickly

    Please suggest me a good book that covers all aspects of pl/sql in depth.
    Thanks in advance. :-)

    A good book for learning PL/SQL quickly?
    That is not a function of the book. That is a function of your ability to learn and understand new concepts. No book can make you learn "faster".
    Also, even before trying to learn PL/SQL, there are concepts and fundamentals to understand. Specifically:
    - [url http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/toc.htm]Oracle® Database Concepts
    - [url http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/toc.htm]Oracle® Database Application Developer's Guide - Fundamentals
    - [url http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm]Oracle® Database PL/SQL User's Guide and Reference
    And after that, also have a look at Application Developer's Guide - Large Objects, Application Developer's Guide - Object-Relational Features. Not to mention the SQL Reference and the PL/SQL Packages and Types Reference guides.
    All available via http://tahiti.oracle.com

  • Any Good Book on SQL , PL/SQL Tuning?

    Hi,
    Please suggest me some good book on SQL , PL/SQL Tuning?
    Thanks.
    --Sam                                                                                                                                                                               

    Anything specific you be looking for?
    Good SQL Books
    Good Online PL SQL Books, Examples &Tutorials
    Good Books for  learning PL/SQL
    good tuning links and books
    Need Assistance for choosing good Pl/SQL books
    Adith

  • Good Books for  learning PL/SQL

    Hello,
    Any information regarding a good book to help me learn pl/sql is most appreciated.
    Thanks

    The best: http://www.amazon.com/Oracle-PL-SQL-Programming-4th/dp/0596009771/ref=pd_bbs_sr_1/104-3233311-7887103?ie=UTF8&s=books&qid=1190300018&sr=8-1
    others that are good:
    http://www.amazon.com/Oracle-Database-10g-SQL-Programming/dp/0072230665/ref=pd_bbs_sr_2/104-3233311-7887103?ie=UTF8&s=books&qid=1190300018&sr=8-2
    http://www.amazon.com/Oracle-SQL-Dummies-Michael-Rosenblum/dp/0764599577/ref=pd_bbs_sr_3/104-3233311-7887103?ie=UTF8&s=books&qid=1190300018&sr=8-3
    You can just watch this Forum too, lots of good info here!
    Jim P.

  • Please sugges the link helpful for writing efficient sql queries

    Please suggest any good resource that is weblink which can help me in optimizing sql queries. especially while writing select statements improve the execution time of the sql query.
    Thanx in advance
    prasanth

    in general I found books from O'Reilly very helpful (not only for Oracle, but for Unix too).
    Moreover there is pretty good Oracle Documentation available.
    After all, it's not only about writing good queries, but also about setting up data-models, indexes, primary keys, etc.
    Look for a real slow computer, take a lot of data, then try writing your speedy queries. This is the school of hard knocks, on the long run it's the best training.

  • Queries regarding SGA, PGA and parsed SQL Queries

    Hi
    I am new to Oracle server architecture.
    Please correct me if am wrong.
    As per my understanding, the data that we retrieve from a SQL query is stored in SGA in Database buffer cache.
    I have some queries:
    1. Does the database buffer cache store only data from SQL queries or anything else also? What is its size? Can we set the size?
    2. Where are the parsed SQL queries stored - SGA or PGA? And where exactly? I want to know if all the users connected in an Instance have access to each other's parsed SQL queries?
    3. SGA is shared by all users in an Oracle Instance? PGA and UGA are local to a specific user in an instance? Is it correct?
    Thanks
    Abhi

    AB312062 wrote:
    Hi
    I am new to Oracle server architecture.
    Please correct me if am wrong.
    As per my understanding, the data that we retrieve from a SQL query is stored in SGA in Database buffer cache.
    I have some queries:
    1. Does the database buffer cache store only data from SQL queries or anything else also? What is its size? Can we set the size?
    2. Where are the parsed SQL queries stored - SGA or PGA? And where exactly? I want to know if all the users connected in an Instance have access to each other's parsed SQL queries?
    3. SGA is shared by all users in an Oracle Instance? PGA and UGA are local to a specific user in an instance? Is it correct?
    Thanks
    AbhiThe questions you have are all good ones, but require far too much to be explained (properly) in a forum such as this.
    I would highly recommend picking up a book by Tom Kyte and reading through that.
    Cheers,

  • Need help in SQL Queries using GUI controls or variables

    Hello, all
    I have a big problem (I have already had with Visual Basic a few mounths ago) with Java while writing my SQL Queries.
    I would like to know how I must do to use variable data or GUI control data in my SQL Query to select only some records.
    Here, my first Query that works without any problem (no WHERE clause !!!) :
    Statement requeteBedes = connectBedes.createStatement();
    ResultSet resultatSeries = requeteBedes.executeQuery("SELECT * FROM Series");
    initComboBoxSeries(resultatSeries);the method "initComboBoxSeries" fills a JComboBox with all the names of the series in my database.
    Here comes my problem.I would like to use the value of the selected "series" in the JComboBox to search in another table of the same Database. I made another statement but it returns a Null ResultSet :
    ResultSet resultatSearchAlbumsFromSeries = requeteBedes.executeQuery("SELECT * FROM bandes_dess WHERE  ser_nom = '" + strComboBoxSeriesSelected + "' "); The variable strComboBoxSeriesSelected contains the value of the selected line in the combobox with all the series, filled after the first query that is here above and that works very well.
    Could some one help me and tell me how I must use variables or GUI controls values in my SQL Queries or tell me if there is a place where I could find an explanation of that kind of problems (like more "advanced SQL Queries", as the ones currently used in all the Learning Java 2 books)
    Thank you all for your help.
    Christian.

    executeQuery() will never return null. At least that's what the spec says. You are probably catching an exception (probably a syntax error caused by a single quote in strComboBoxSeriesSelected) and ignoring it. Or do you mean the ResultSet contains no rows?
    Anyway, to use parameterized queries, take a look at PreparedStatements. Your code should look like this using PreparedStatement:Statement requeteBedes = connectBedes.prepareStatement("SELECT * FROM bandes_dess WHERE  ser_nom = ?");
    requeteBedes.setString(1, strComboBoxSeriesSelected);
    ResultSet resultatSeries = requeteBedes.executeQuery();Alin.

  • What are the best books for PL/SQL and Forms for BEGINNERS?

    I asked about learning Oracle Forms in an earlier thread. Some suggested Oracle training at official Oracle Training centers like Koenig. I just went to the Koenig site. The OCA & OCP Forms Developer Training Boot Camp is a whopping 2,610 USD. That’s like 1/4 Million LKR. It’s more that the yearly salary of both the 2 new developers we got and want to train. That’s out of the question.
    Some have suggested shadowing experiences programmers and team coding. Both options are out, since those things don't work here.
    Learning from sites such as Francois Degrelle's blog is no good for new people since they will get confused.
    I have come to the conclusion that the only way to do is to buy 2 books, one for PL/SQL and another for Oracle Forms, give it to them and ask them to follow the book and learn it and also give a time period like 2 or 3 months.
    What are the good books out there for BEGINNERS to learn PL/SQL and Forms?
    Edited by: Channa on Aug 8, 2010 10:08 PM
    Edited by: Channa on Aug 8, 2010 10:12 PM

    In addition to the books the chapter Application Developer's Guide - Fundamentals in the documentation is also worth giving a shot:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/toc.htm
    Just for the record: I believe leaving them alone with the books won't do it. I'd at least define objectives (e.g. $chapters of the books in a week) and after they achieved them I'd test their knowledge of the individual objectives (like it was back in school :p ). By that you have control over how they are proceeding, you can focus on the things they didn't understand and you are able to eradicate some bad habits they might adopt during their studies.
    If you don't take your time to train them proper you won't get good developers anyway and you will loose much more time and money...
    cheers

  • Which Event Classes i should use for finding good indexs and statistics for queries in SP.

    Dear all,
    I am trying to use pro filer to create a trace,so that it can be used as workload in
    "Database Engine Tuning Advisor" for optimization of one stored procedure.
    Please tel me about the Event classes which i  should use in trace.
    The stored proc contains three insert queries which insert data into a table variable,
    Finally a select query is used on same table variable with one union of the same table variable, to generate a sequence for records based on certain condition of few columns.
    There are three cases where i am using the above structure of the SP, so there are three SPS out of three , i will chose one based on their performance.
    1) There is only one table with three inserts which gets  into a table variable with a final sequence creation block.
    2) There are 15 tables with 45 inserts , which gets into a tabel variable with a final
    sequence creation block.
    3)
    There are 3 tables with 9 inserts , which gets into a table variable with a final
    sequence creation block.
    In all the above case number of record will be around 5 lacks.
    Purpose is optimization of queries in SP
    like which Event Classes i should use for finding good indexs and statistics for queries in SP.
    yours sincerely

    "Database Engine Tuning Advisor" for optimization of one stored procedure.
    Please tel me about the Event classes which i  should use in trace.
    You can use the "Tuning" template to capture the workload to a trace file that can be used by the DETA.  See
    http://technet.microsoft.com/en-us/library/ms190957(v=sql.105).aspx
    If you are capturing the workload of a production server, I suggest you not do that directly from Profiler as that can impact server performance.  Instead, start/stop the Profiler Tuning template against a test server and then script the trace
    definition (File-->Export-->Script Trace Definition).  You can then customize the script (e.g. file name) and run the script against the prod server to capture the workload to the specified file.  Stop and remove the trace after the workload
    is captured with sp_trace_setstatus:
    DECLARE @TraceID int = <trace id returned by the trace create script>
    EXEC sp_trace_setstatus @TraceID, 0; --stop trace
    EXEC sp_trace_setstatus @TraceID, 2; --remove trace definition
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • How to use database control to execute sql queries which change at run time

    Hi all,
    I need to execute sql queries using database controls , where the sql changes
    at run time
    based on some condition. For eg. based on the condition , I can add some where
    condition.
    Eg. sql = select id,name from emp where id = ?.
    based on some condition , I can add the following condition .
    and location = ?.
    Have anybody had this kind of situation.
    thanks,
    sathish

    From the perspective of the database control, you've got two options:
    1) use the sql: keyword to do parameter substitution. Your observation
    about {foo} style sbustitution is correct -- this is like using a
    PreparedStatement. To do substitution into the rest of the SQL
    statement, you can use the {sql: foo} substitution syntax which was
    undocumented in GA but is documented in SP2. Then, you can build up
    the filter clause String yourself in a JPF / JWS / etc and pass it into
    the DB control.
    For example:
    * @jc:sql statement="select * from product {sql: filter}"
    public Product[] getProducts(String filter) throws SQLException;
    This will substitute the String filter directly into the statement that
    is executed. The filter string could be null, "", "WHERE ID=12345", etc.
    2) you can use the DatabaseFilter object to build up a set of custom
    sorts and filters and pass that object into the DB control method.
    There have been other posts here about doing this, look for the subject
    "DatabaseFilter example".
    Hope that helps...
    Eddie
    Dan Hayes wrote:
    "Sathish Venkatesan" <[email protected]> wrote:
    Hi Maruthi,
    The parameter substituion , I guess is used like setting the values for
    prepared
    statements.
    What I'm trying to do , is change the sql at run time based on some condition.
    For example ,
    consider the following query :
    select col1,col2 from table t where t.col3 > 1
    At run time , based on some condition , I need to add one more and condition.
    i.e. select col1,col2 from table t where t.col3 > 1 and t.col4 < 10.
    This MAY not address your issue but if you are trying to add "optional" parameters
    you may try including ALL the possible parameters in the SQL but send in null
    for those params that you don't want to filter on in any particular case. Then,
    if you word your query
    as follows:
    select col1, col2 from table t where t.col3 > 1 and (t.col4 = {col4param} or
    {col4param} is null) and (t.col5 = {col5param} or {col5param} is null) ...
    you will get "dynamic" filters. In other words, col4 and col5 will only be
    filtered if you send in non-null parameters for those arguments.
    I have not tried this in a WL Workshop database control but I've used
    this strategy dozens of times in stored procedures or jdbc prepared statements.
    Good luck,
    Dan

  • Which SQL queries to count on OFO 9042 & Content Services 10120

    Dear experts,
    In customer context we urgently need to know which SQL queries to use :
    - to count on OFO 9.0.4.2 the number of workspaces
    - to count on OFO 9.0.4.2 the number of metadata elements (categories & attributes) attached to documents
    - to count on Content Services 10.1.2.0 the number of containers
    - to count on Content Services 10.1.2.0 the number of libraries
    - to count on Content Services 10.1.2.0 the number of folders
    - to count on Content Services 10.1.2.0 the number of groups
    - to count on Content Services 10.1.2.0 the number of categories
    - to count on Content Services 10.1.2.0 the number of attributes
    - to count on Content Services 10.1.2.0 the number of workspaces
    Thank a lot for your kind answer.
    Best regards.
    Jean-Francois

    Congrats to Shanky and Durval!
     SQL Server General and Database Engine Technical Guru - June 2014  
    Shanky
    SQL Server: What does Column Compressed Page Count Value Signify
    in DMV Sys.dm_db_index_physical_stats ?
    DB: "Interesting and detailed"
    DRC: "• This is a good article and provides details of each and every step and the output with explanation. Very well formed and great information. • We can modify the create table query with “DEFAULT VALUES". CREATE TABLE [dbo].[INDEXCOMPRESSION](
    [C1] [int] IDENTITY(1,1) NOT NULL, [C2] [char](50) NULL DEFAULT 'DEFAULT TEST DATA' ) ON [PRIMARY]"
    GO: "Very informative and well formed article as Said says.. Thanks for that great ressource. "
    Durval Ramos
    How to get row counts for all Tables
    GO: "As usual Durva has one of the best articles about SQL Server General and Database Engine articles! Thanks, buddy!" "
    Jinchun Chen: "Another great tip!"
    PT: "Nice tip" 
    Ed Price: "Good topic, formatting, and use of images. This would be far better if the examples didn't require the black bars in the images. So it would be better to scrub the data before taking the screenshots. Still a good article. Thank you!"
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

Maybe you are looking for

  • What is going on with my phone and what can I do to fix the problem?

    This is the second time this has happened to my phone. For some random reason, it decides to shut off on me. No matter how many times I press the home button or the lock button, it still acts as if it's powered off. It makes no sound, nor any vibrati

  • How to read emails using javamail

    hello friends well i am working on a project on phishing for that i had usinf javamail to read out the mails while i open my any email account while i working on the net . actually what i want is whenever i open my account my program could detect the

  • Autocommit in Stored procedures

    Hi all! Can we set the autocommit variable in a stored procedure? if yes, how? regards, Rajat Aggarwal

  • Mailing summary of successfully executed process flow

    i have process flow that includes multiple number of mappings, each one has function that emails the errors if the mapping is not successful. now at the end of the process flow i want to send out summary email with info about all mappings in the proc

  • Flex UI generation from xml input

    hi, i have a requirement where user will create xml file for the ui screen that he wants,the xml file will contain the information about the components to be placed on the screen for eg. label,combobox,button etc we want to write a program which will