Sql date interview questions

Sdílet
Vložit
  • čas přidán 6. 09. 2024

Komentáře • 49

  • @BornDude25
    @BornDude25 Před 5 lety +82

    Can someone urge Indian Government to award Bharat Ratna to Venkat Sir.He is a real teacher.I cannot say how many are placed just because of his videos but there are many who are working in MNC's just because of him.

    • @saktiprasadswain6546
      @saktiprasadswain6546 Před 5 lety +10

      I want to keep his Pic on my table.But I dont how he looks.He is our real Guru.Whatever I m becoz of him.

    • @mohammednaveed899
      @mohammednaveed899 Před 3 lety +2

      100% Agree

    • @jigneshvyas3105
      @jigneshvyas3105 Před 2 lety

      lol...but agree....I have immense respect and gratitude for him. I can just tell from his voice that he must be a noble human being.

    • @art-es5lf
      @art-es5lf Před 2 lety +1

      Very True bro i was struggling in sql like hell.....His videos are the greatest on youtube and better than all other platforms..
      now i have gained huge confidence..

  • @vaibhavvaibhav6118
    @vaibhavvaibhav6118 Před 4 lety +1

    You are too good. Everytime I go for an interview I always lookup for your videos.

  • @NaseerAhmad-ck1vs
    @NaseerAhmad-ck1vs Před 5 lety +3

    Thank you sir for helping us
    Your CZcams channel is the best .

  • @saktiprasadswain6546
    @saktiprasadswain6546 Před 5 lety +1

    This is very very imp video which u needed much long before..Thank u sir ...

  • @naazlyhameed8468
    @naazlyhameed8468 Před 5 lety +3

    May Allah bless you. Plz keep uploading videos

  • @365DataScience
    @365DataScience Před 5 lety +2

    Here are some frequently encountered SQL interview question, and my top tips to answering them:
    1. What is SQL?
    SQL, Structured Query Language, is a programming language designed for working with databases. Some people, however, argue that it is not exactly a programming language since it has not been created with the notion of using features of procedural languages, such as conditional statements or “for” loops. These people insist on calling SQL a coding language because it is only about executing commands for querying, creating, inserting, updating, and deleting data in a database. Nonetheless, the most important thing is to know what the domain of SQL is.
    2. What is a Database? What is a DBMS?
    A database is data stored on a computer and ordered in a way that makes it easy to access and manipulate. a database management system - DBMS is the software tool that allows users to interact with the data stored in the database.
    You could conclude by explaining there are two types of database management systems - relational and non-relational. SQL is a language, designed only for working with relational DBMSs.
    Such questions are usually asked in the beginning of the interview so that you can start preparing for the difficult ones.
    3. What is the difference between DDL, DML, DCL, and TCL?
    First of all, let’s explain what there acronyms stand for:
    “L” stands for “Language” in all of them. And this must help you remember that these are the four categories in which the SQL commands have been separated into.
    DDL stands for Data Definition Language and includes the commands that allow you to CREATE, DROP, ALTER, and TRUNCATE data structures. DML involves commands for manipulating information. It actually means “Data Manipulation Language”, and gives the possibility to SELECT, INSERT, UPDATE, and DELETE data. it is this part of the language you will most use at work, if you are using SQL in the field of data science or business intelligence.
    DCL, Data Control Language, consists of commands that are usually used by database administrators. This one allows programmers to GRANT and REVOKE rights defining how much control you can have over the information in the database.
    Similarly, TCL, which is the Transaction Control Language, also includes the commands applied by database administrators. These command ensures that the danger of suffering from data loss is minimal.
    4. What is the point of using a foreign key constraint?
    The foreign key constraint comprises a set of rules, or limits, that will ensure that the values in the child and parent tables match. Theoretically, the foreign key constraint will maintain the referential integrity within the database.
    5. Define and provide an example of using an inner join.
    Obviously, you must be aware that joins are one of the most frequently used tools in SQL, regardless of your job role. Particularly if you are working in the sphere of business intelligence, your work will be centred around understanding SQL joins in depth.
    So, an SQL join is a tool that allows you to construct a relationship between objects in your database. Consequently, a join shows a result set containing fields derived from two or more tables.
    For instance, assume that in one table you have data about the customer ID and fields related to the sales a customer has made, and in the other, you have data about the customer ID and their private information, such as first and last name and email address. Therefore, an inner join allows you to obtain an output containing information from both tables only for the customer IDs found in the two tables that match. Provided that you set the customer ID field to be a matching column, of course.
    6. What is the difference between MySQL and PostgreSQL? How about between PL/SQL and SQL?
    The interviewers ask these questions as they want to find out how much you are acquainted with the fact that SQL has a few versions, each carrying specific features.
    You could say that MySQL and PostgreSQL are just two versions of the Structured Query Language. Since you’ve just been asked about joins, you could mention that PostgreSQL supports outer joins, while MySQL doesn’t - you’ll need to use UNION or UNION ALL to emulate an outer join in MySQL. This way you could even impress the interviewers with extra knowledge in this subject.
    PL/SQL is not a version of SQL, however, and that’s the tricky part of the question. PL/SQL is a complete procedural programming language and its scope of application is different. It is not strictly related to relational databases.
    7. What is an SQL View?
    Your potential future employers may want to give a toned-down SQL interview question. That’s why they might ask a general question.
    A view is a virtual table whose contents are obtained from an existing table or tables, called base tables. The retrieval happens through an SQL statement, incorporated into the view. In other words, you can think of a view object as a view into the base table. The view itself does not contain any real data; the data is electronically stored in the base table. The view simply shows the data contained in the base table.
    Good luck!
    Source: bit.ly/2Fe6x4Q
    Best,
    365 Data Science
    Online educational career website
    365datascience.com/

    • @MrKoukoo
      @MrKoukoo Před 5 lety

      Thank you!!!., It is helful

  • @srinubathina7191
    @srinubathina7191 Před 29 dny

    Thank You so much Venkat Sir

  • @habtomnigatu5709
    @habtomnigatu5709 Před 5 lety +3

    I learned a lot from your videos.Thank you so much & Could you please also make a lectures for database administrator.

  • @quadirnawaz67
    @quadirnawaz67 Před 3 lety

    Thank you so much for this SQL tutorial series. You really are awesome

  • @darshgupta101
    @darshgupta101 Před 5 lety +2

    Sir , please also suggest the Oracle counterpart for these solutions to workaround with datetime

  • @AsfakullahLayek
    @AsfakullahLayek Před 8 měsíci

    Awesome Explanation

  • @jaydeepchavda3772
    @jaydeepchavda3772 Před 5 lety +1

    Thank you sir for preparing such a nice video series. Please make such a nice videos on SSIS and SSRS..

  • @swethaveluguri9115
    @swethaveluguri9115 Před 5 lety +1

    Great teaching sir. Please add video for difference between ANALYTICAL and AGGREGATE functions in SQL

  • @300lazio
    @300lazio Před 4 lety +1

    Thank you, great video as always.

  • @seetharamkothapalli7961
    @seetharamkothapalli7961 Před 5 lety +2

    could you plz ulpoad emi calaculation in strored procedures with auto-genarated in month or years

  • @KrishnaBallaviRath
    @KrishnaBallaviRath Před 5 lety

    Thank you so much
    all vedios are based on real time questions...

  • @book_addict.5721
    @book_addict.5721 Před 3 lety

    Man, Who u really are.
    because for me you're my database angel.

  • @jennylockwood1020
    @jennylockwood1020 Před 4 lety

    Thank you Venkat for all your videos :)

  • @adinarayanamamilla2836

    Very nice video for interviews, the way of explanation is awesome. can you please make a video on CASE function please

  • @sh4rk717
    @sh4rk717 Před 3 lety

    Could you make a playlist with all these 16 parts of Q&A? Thank you very much!

  • @raqibul1000
    @raqibul1000 Před 5 lety +1

    ALLAH bless you sir

  • @poornaps
    @poornaps Před 4 lety +1

    Hi Sir, just wanted to know how the same day and month fucntion --DAY(DateOfBrith) = 30 And MONTH(DateOfBirth) = 11 will works for postgre sql ?
    postgresql --
    select cast(fc.contact_date as date)as DatePart, fc.contact_channel, count(fc.call_talk_time),
    Round(avg(fc.call_talk_time),2) AS AvgCol, mod(round(avg(call_talk_time),0),60) as modulo
    from ssisdb.fact_contact as fc
    FULL JOIN ssisdb.dim_case_detail as cd
    ON fc.contact_id = cd.contact_id and fc.contact_channel = cd.contact_channel and fc.contact_date = cd.contact_date
    where DAY(fc.contact_date) =06 and Month(fc.contact_date) =11
    group by cast(fc.contact_date as date), fc.contact_channel;

  • @voletilahari9967
    @voletilahari9967 Před 4 lety

    hi Venkat, thanks a lot for the most useful videos, can u please solve this query by tomorrow at least try to comment the code its important.
    1)list out the employee names who purchased at least 5 items on two separate days?

  • @sams4319
    @sams4319 Před 4 lety

    Sir can you post an example for fetching consecutive empty seats....from seats table that has Id seat number and availability columns..input is dynamic like 3 seats or 5 seats...but should be consecutive next to each other...ex bookmyshow app

  • @ymtan
    @ymtan Před 5 lety +1

    Hi Venkat,
    I don't really understand the first parameter of the following DATEADD() function. Could you kindly explain what is the first parameter of the DATEADD() function and why do you specify DAY as the first parameter of the DATEADD() function ???
    DATEADD(DAY, -1, CAST(GETDATE() AS DATE))

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  Před 5 lety

      To specify the date part to which we want to add -1. In our case we want to add -1 to the day number in the date, so we get yesterday's date. If you want to add -1 to the month number, then you specify the first parameter as month. Please check the following video where we have discussed DATEADD and other Date related functions in detail.
      czcams.com/video/eYsizQVa_EU/video.html
      Here is the text articel for the same. Hope this helps.
      csharp-video-tutorials.blogspot.com/2012/09/datepart-dateadd-and-datediff-functions.html

    • @avinash8535
      @avinash8535 Před 3 lety

      Dear @@Csharp-video-tutorialsBlogspot Sir, i have a question from my client and I hope only u are the one who can give me the answer... A simple or complex 'Select' query which gives multiple columns data with one column of Id's and another column as varchar(max).. Now my client requested to have the data to be splitted into next line per after every sentence with in a single row.. Tried to find a way but failed and I was able to find CHAR(13) that too will be used only in Print but not select.. Hope i am able to explain the client requirement clearly to u and expecting a response..
      Thanks,
      Avinash

    • @saihuman3840
      @saihuman3840 Před 3 lety

      @@avinash8535 hi bro

    • @avinash8535
      @avinash8535 Před 3 lety

      @@saihuman3840 yes?

    • @saihuman3840
      @saihuman3840 Před 3 lety

      @@avinash8535 bro how can I talk to u

  • @anirvansen2941
    @anirvansen2941 Před 4 lety

    Really helpful thanks.

  • @mermaidviv4517
    @mermaidviv4517 Před 3 lety +1

    I am getting the following error message "Conversion failed when converting the varchar value '2018-11-19 10:36:46.520' to data type int." when creating the table. How do I resolve this?

  • @harshavardhanan.j5057
    @harshavardhanan.j5057 Před 4 lety

    Make the conditions dynamic as to get the same birthday without knowing the values in the table

  • @shalinipatel1181
    @shalinipatel1181 Před 2 lety +1

    Hi everyone, can you help me with the question asked to me in an interview
    Tbl1 Tbl2
    Col1 col1
    1 1
    1 1
    1
    Inner join , left join and right join output of these 2 tables and how does it work?

    • @ashishchinna9201
      @ashishchinna9201 Před rokem

      Since both the column values are same, you will get the same result set for any type of join.
      Left Join : Each 1 from left has every 1 from right, so total 6 records.
      Right Join : Each 1 from right has every 1 from left, so total 6 records.
      Inner Join : For every 1 in left has a matching every 1 from right, so total 6 records.

  • @aripakaharshit4752
    @aripakaharshit4752 Před 4 lety

    Hi Sir,
    Can you please give us an example of GENDER SWAP(If MALE then FEMALE) using a single line, simple single SQL query?

    • @harinivenkateshan4613
      @harinivenkateshan4613 Před 4 lety +1

      update set gender=case when gender = 'male' then 'female' else 'male' end;

  • @javidhesenov7611
    @javidhesenov7611 Před 2 lety

    thanks

  • @babaryaseen389
    @babaryaseen389 Před 3 lety

    Thanks Sir

  • @sambitpati6129
    @sambitpati6129 Před 5 lety

    Sir please make video tutorial for msbi and powerBI if possible

  • @sowmyagirish4155
    @sowmyagirish4155 Před 5 lety

    Please upload more videos. Thank 🙏💕🙇🙇

  • @Indian_working_mom
    @Indian_working_mom Před 4 lety

    Please upload sql tutorial some sql server queries are not supported in SQL what to do

  • @rameshpuli3233
    @rameshpuli3233 Před 5 lety

    how to retrieve recent hiredate from employee table

  • @oddnumber8149
    @oddnumber8149 Před 4 lety +1

    where is the fucking data?