3-7 Years Interview Experience | Java | Spring Boot | Microservices | SQL | Nagarro — Transcript
Full transcript
- 0:01okay so in your spring boot
- 0:05application how do you manage the code
- 0:08coverage so what steps do you follow and
- 0:12what is code
- 0:14coverage yeah so whenever we write the
- 0:17test cases right so we see that how much
- 0:22the portion of the code is covered under
- 0:25that so uh code coverage is nothing but
- 0:30it shows the percentage of the code
- 0:33which is covered using the test case we
- 0:36have written so basically it reduces the
- 0:40chances of having bugs in the
- 0:43application by covering the maximum code
- 0:47so in my current organization we follow
- 0:51minimum 90% of the uh code coverage MH
- 0:55so in all the uh code check-ins we do so
- 1:00before that we make sure that the 90% of
- 1:04the code is uh covered M so uh for that
- 1:08we use uh
- 1:10eemma so that is the STS tool which we
- 1:14can integrate with the STS and it
- 1:17basically whatever the code is covered
- 1:19so that will come into green and the
- 1:22portion is not covered will be in the uh
- 1:25red and it will be yellow if it is
- 1:28partially covered so so under the hood
- 1:30it uses Joko this is how we follow the
- 1:34code coverage in our uh spring boot
- 1:38application okay okay okay so how do you
- 1:43perform testing in your spring boot
- 1:46application yeah so so the testing can
- 1:50be of many types it can be either you
- 1:53need testing it can be integration
- 1:56testing into in testing or it can be
- 1:59perform testing so whenever we do the
- 2:03unit testing in that case uh like we
- 2:06test the methods and classes like uh
- 2:11individually we have three layers in our
- 2:14spring boot application our controller
- 2:17uh service and repository layer so we
- 2:21write the separate uh test cases for
- 2:24these three and suppose uh we are
- 2:27testing the controller and uh that is
- 2:30calling the service from there right so
- 2:35we can uh mock that service so since we
- 2:38also do the unit testing for that
- 2:40service class as well so uh wherever it
- 2:43is calling uh another service or
- 2:48any um uh API call or any other calls
- 2:53are happening so those calls we can mock
- 2:56it and we can write the standard return
- 2:58of it and that return return we can
- 3:01assume that okay that actual uh actual
- 3:04call is being made and that is the
- 3:05response based on that response we can
- 3:08further proceed so that is how we do the
- 3:11unit testing so in integration testing
- 3:13we test like uh how different units or
- 3:18components they work together when we
- 3:20combine them so when they interact with
- 3:22each other then how they perform so that
- 3:25is what we say integration testing then
- 3:27in case of into end testing we test the
- 3:30whole application as a component and we
- 3:33see if that does not have any issue then
- 3:37we also do performance testing so we
- 3:40check whenever the huge load is there on
- 3:43the application then how it
- 3:45performs so that is also there so yeah
- 3:49this is how we do the testing okay so
- 3:53how you do performance testing so
- 3:55performance testing usually we don't do
- 3:59and test
- 4:00perform that testing so they uh normally
- 4:04use uh J meter and all so they do like
- 4:08load testing and stress testing all that
- 4:10they do but uh I have not worked much on
- 4:14it okay so how do you perform logging in
- 4:17your
- 4:18application yeah logging we perform
- 4:22using uh slf
- 4:254J so that we use for logging and uh
- 4:30uh we use
- 4:32lombok so using that uh we don't have
- 4:36to uh write so that can remove the bar
- 4:40plate code and we can simply use
- 4:43annotation uh like at the rate of uh
- 4:46self 4J and then simply we can give uh
- 4:50log. debug or whatever we want so we can
- 4:54simply give the logging related
- 4:56properties in uh application Properties
- 5:00or EML file so whatever the loging level
- 5:04is there that we can Define there and
- 5:06also whatever the log output format will
- 5:09be there so like with date month timings
- 5:13whatever so all those things we can
- 5:15mention in the properties orl file so
- 5:19yeah so that is how we do logging okay
- 5:22so how do you perform centralized
- 5:25logging in
- 5:27microservices yeah we use uh
- 5:30uh elk stack for
- 5:33that and for visualization we also use
- 5:38kibana okay so what are the different
- 5:40loging levels are
- 5:42there yeah so we have debug
- 5:46info uh warn error Trace fatle so yeah
- 5:54okay okay okay how do you maintain code
- 5:58quality in your project so what are the
- 6:00steps you follow yeah for code
- 6:03quality uh so we have a test cases right
- 6:08so we see the uh the coverage of that so
- 6:12that is one way then we have uh uh sonar
- 6:17lint sonar Cube so sonar lint basically
- 6:20we can integrate with our ID and we can
- 6:24get the real time feedback on if any
- 6:27code is uh like not written properly so
- 6:32any proper syntax we have not given and
- 6:34all right so those things we can find
- 6:38out so sonar CU we can use for that so
- 6:43it it
- 6:45basically uh connects with the central
- 6:48uh sonar Cube server and based on the
- 6:51rules it validates the whatever the code
- 6:53is written and uh it uh applies all the
- 6:58rules to to the across the projects and
- 7:02across the all the team members also we
- 7:05review uh each other's code yeah so
- 7:08these are the various uh okay what are
- 7:11the design patterns you follow in
- 7:14microservices yeah there are various
- 7:17design patterns API Gateway pattern is
- 7:19there uh circuit break breaker pattern
- 7:22is there so whenever uh we have uh uh
- 7:27any services not reach table or
- 7:30something like that so we write the
- 7:31fallback method for that then we have a
- 7:35service Discovery pattern is there so
- 7:38this helps microsof dynamically discover
- 7:40each other so they using the
- 7:45registry and then we have Saga design
- 7:48pattern so this manages distributed
- 7:51transactions across the micro services
- 7:53using the uh series of local
- 7:56transactions with uh uh compan set
- 7:59actions so yeah these are the design
- 8:02patterns are there okay how do you
- 8:04resolve version conflict in m in a
- 8:07spring boot yeah we resolve version
- 8:11conflict
- 8:12using uh we have a command I think MH uh
- 8:16M dependency then tree so that we used
- 8:21to visualize the entire dependency tree
- 8:24and
- 8:25identify uh where the conflict is so
- 8:29basically this command shows us uh which
- 8:31dependencies are pulling in Conflict
- 8:33version that is one way also if the
- 8:37dependency is brought in
- 8:39transitively so maybe uh by any other
- 8:44dependency then we can explicitly Define
- 8:47the version of that dependency to
- 8:51resolve uh if we have to downgrade or
- 8:54upgrade that so we can do that so it
- 8:58will override the uh by default uh
- 9:01version apart from that we can also use
- 9:03exclusions if we don't want any uh like
- 9:08interdependency uh like if any
- 9:11dependency is downloading other
- 9:13dependency and we don't want that then
- 9:15we can use exclusions for that as well
- 9:19so yeah so these are the ways okay what
- 9:22is the difference between war and
- 9:25embedded
- 9:26containers yeah War basically contains
- 9:30the one application it does not have the
- 9:36external server like Tom cat or Jos
- 9:40whatever we use but embedded container
- 9:44will have the embedded server so default
- 9:48will be Tomcat so we don't have to
- 9:51explicitly download server and deploy
- 9:54the application over there so this is
- 9:57the main difference between uh dig to
- 9:59what is a spring boot
- 10:01profiles yeah spring boot profiles are a
- 10:05way to segregate parts of our
- 10:09application uh and make it available
- 10:11only in certain environments like we can
- 10:15have multiple environments like uh we
- 10:18can have Dev environment we can have QA
- 10:20we can have production right so uh
- 10:24sometimes we want certain settings to or
- 10:28certain configurations to work only with
- 10:31the uh specific environment so profiles
- 10:35comes into picture and we use profiles
- 10:38for this purpose so we can have uh
- 10:41separate Properties or EML files for
- 10:45different uh profiles like maybe
- 10:49application uh dev. properties
- 10:52application test. properties like that
- 10:55and uh whatever the profiles will will
- 10:59be set if it is profile is dev then
- 11:02application dev. properties will be
- 11:04picked up there are some common
- 11:07properties are also there so that can be
- 11:10picked from the application properties
- 11:12only but those which are a specific to
- 11:16the dev or test environment so apart
- 11:18from those application properties those
- 11:21application Dev properties also will be
- 11:23picked if the profile is Dev to access
- 11:27the active profiles I think think uh we
- 11:31have one environment object so that we
- 11:34can uh inject to the class wherever we
- 11:38want that so with that environment. get
- 11:43active profiles will give us the uh
- 11:46active
- 11:47profile so yeah okay what are the
- 11:51advantages and this advantages of spring
- 11:55boot yeah there are various advantages
- 11:58of a spring boot
- 12:00so uh it it it has removed lots of
- 12:04configuration Parts which we used to do
- 12:07in Spring
- 12:10so um so spring boot provides many Auto
- 12:14configurations so that allows basically
- 12:17the developers to focus only on to
- 12:20writing the
- 12:22Logics uh so and not focusing on the
- 12:25configuration part and also it provides
- 12:29the embedded server so we don't have to
- 12:33explicitly uh add go and add the servers
- 12:36right so we have Tom cut by default and
- 12:40then in Spring we had lots of XML
- 12:43configurations and all that is not
- 12:45required uh anymore in Spring boot right
- 12:48so so all the bu plate codes has been
- 12:52REM spring also we can achieve without
- 12:55writing the XML right we don't have to
- 12:58write the XML yeah yeah uh you are right
- 13:02so basically from the spring 3.0 onwards
- 13:06the that framework introduced the uh
- 13:10capability to use a Java based
- 13:12configurations with uh add
- 13:14configurations and add dat to Bean
- 13:16annotations so user no need to uh use
- 13:22XML based configuration
- 13:24anymore but in Spring boot uh from the
- 13:28very beginning itself if there is
- 13:29nothing uh we have to do with the xmls
- 13:33so the configuration part is uh has been
- 13:37automated so spring boot starter
- 13:41dependencies uh that package the
- 13:43commonly used libraries together so we
- 13:46don't have to worry about the versions
- 13:49and
- 13:50compatibility of the different libraries
- 13:52with each other because this comes in a
- 13:55bundle
- 13:56so yeah so these are the uh advantages
- 14:00are
- 14:01there okay and
- 14:05disadvantages yeah disadvantages are
- 14:08like um whenever we have a very a small
- 14:12application so we should not go for the
- 14:17uh spring Boot and all we can go with
- 14:20the uh simple monolithic
- 14:23application so I mean for simple
- 14:27applications or microservices
- 14:29so spring boot is kind of maybe
- 14:34unnecessary so we can go for other
- 14:38lightweight Frameworks in that
- 14:40case and uh
- 14:43also sometimes uh the auto configuration
- 14:46behavior in a spring
- 14:48boot uh we Face uh we may face the
- 14:53conflicts so we have to uh debug it and
- 14:57see like which version of which jar has
- 15:00been downloaded and all so we have to
- 15:03resolve it right and also we have uh
- 15:07various microservices right so suppose
- 15:11uh um whatever
- 15:15the uh
- 15:18data we have in one of the micros
- 15:22service so we have to make sure that all
- 15:25the microservices are in sync with each
- 15:27other so sometimes any of the
- 15:30microservice is not working or it is
- 15:33down or its database is not getting
- 15:35updated we have to make sure when it is
- 15:38up it should be in sync so these are the
- 15:41challenges are also there so yeah these
- 15:43are the uh disadvantages are there okay
- 15:47okay what is the difference between rest
- 15:50controller and
- 15:52controller yeah rest controller is
- 15:54nothing but controller with response
- 15:57body so that is what we say rest
- 16:00controller we use uh
- 16:03controller uh when we have the uh MBC
- 16:07architecture we are working with and the
- 16:10response we want to uh return to uh JSP
- 16:16page or similar so in that case we work
- 16:20we go for
- 16:22controller but uh if we have restful web
- 16:26service so in that case we use rest
- 16:29controller so we don't have to
- 16:31explicitly write uh at rate of response
- 16:35body in this case so whenever we have to
- 16:38return model and view object so in that
- 16:40case we use uh add controller but
- 16:43whenever it is uh uh restful uh web
- 16:47service in that case we go go for the
- 16:50add dat of rest controller okay what is
- 16:52the difference between get mapping and
- 16:55request mapping yeah request mapping is
- 16:59like kind of more generic way of uh
- 17:03getting the mapping so we can have get
- 17:07post put delete all that with along with
- 17:10the request
- 17:11mapping so we can use as per our but get
- 17:16mapping is like more specialized to
- 17:19getting the data so request mapping and
- 17:22Method equal to get is similar to get
- 17:24mapping so get mapping is more
- 17:27convenient to use whenever we have the
- 17:30get request also request mapping we can
- 17:33use for broader use cases like uh uh we
- 17:37can specify the request parameters
- 17:40headers media types and all that also
- 17:44this consumes and produces also we can
- 17:46give so request mapping can be used for
- 17:49all but uh we have been provided with
- 17:53get mapping post mapping put mapping
- 17:56delete mapping so we have any speci
- 17:58specific kind of mapping we want to do
- 18:01so we can go with these okay what are
- 18:04the common security
- 18:06vulnerabilities found in web
- 18:10applications uh there are many of them
- 18:13so one is the injection attack then we
- 18:17have cross site scripting uh not using
- 18:20of https using HTTP instead and trying
- 18:23to use uh directly uh accessing the
- 18:27sensitive resources maybe some files or
- 18:30database without any proper
- 18:32authentication or
- 18:34authorization so to have these uh we
- 18:38should do proper authentication and
- 18:40authorization so whatever the inputs are
- 18:42coming from the users we should have the
- 18:46proper validation of those inputs so
- 18:49that they can not run the any kind of
- 18:53scripting and all to our application and
- 18:57also uh we should not allow from the
- 19:00cross site so we have the uh uh
- 19:07configuration uh using which we can
- 19:10disable this uh cross site uh access of
- 19:15the application also we should try
- 19:17avoiding and secure apis apis that do
- 19:21not Implement proper authentication
- 19:24validation or encryption so that can
- 19:27also exploit
- 19:29that can also be exploited by attackers
- 19:31to access or uh manipulate any sensitive
- 19:34data so yeah so these are the
- 19:37vulnerabilities we have how do you
- 19:40handle complex queries using spring data
- 19:44jpa so spring data jpa basically gives
- 19:48uh the it has whole lots of
- 19:50documentation in which we have uh let's
- 19:53say very complex query so such as uh
- 19:57let's say some employee which has salary
- 20:00or some greater than some amount so we
- 20:04have inbuilt method so find uh employees
- 20:08with salary greater than we can use for
- 20:11that so uh we don't have to write the
- 20:14whole query uh Native query in this case
- 20:17but wherever the uh jpql so this is
- 20:21basically called the jpql so which is
- 20:25provided by uh spring data jpa so uh
- 20:29wherever this JP jpql is not allowed or
- 20:34uh sorry jpql is uh we cannot write
- 20:38suppose we cannot write that then in
- 20:40that case we can also go with the native
- 20:44queries so so that we can write using uh
- 20:48at the rate of query and there we can
- 20:50give value and there we can write the
- 20:53whole query right so that way we can
- 20:56write the uh native queries we can also
- 21:00write the procedures if required and
- 21:04that procedure we can directly call from
- 21:06our repository class apart from that we
- 21:10can also use a
- 21:11specifications so for dynamic and
- 21:14complex queries we can use a
- 21:16specification API uh provided by Spring
- 21:20data jpa so that allows us to build
- 21:23queries programmatically using criteria
- 21:26API so we can use criteria builder for
- 21:29that and then we can use that okay so
- 21:32suppose you have a huge data in your
- 21:35database and you have to se all this
- 21:39data to
- 21:40UI so what approach you
- 21:43follow can you explain yeah so whenever
- 21:47we have a huge data in that case uh if
- 21:52uh we have to S it to some UI so we
- 21:55don't s all of them all together
- 21:59so we can use pagin basically MH so um
- 22:03at a time let's say if the UI has the
- 22:06capability to S like 10 items so we will
- 22:11uh share only 10 items to the uh UI
- 22:15whatever the request is passed from the
- 22:18UI so that will have the information of
- 22:22the offset and limit like limit means
- 22:27like how many items it wants and offset
- 22:29me from which like suppose already we
- 22:31are on the third page so maybe 31st to
- 22:3640th item we would like to process and
- 22:39show to UI MH so uh limit will be 10 and
- 22:43offset will be uh like
- 22:4631st okay so we can show uh like 10 or
- 22:51nine items uh whatever it
- 22:54is so for that uh we have a payable
- 22:58object
- 22:59so we prepare the pageable object from
- 23:02the uh whatever the request has come and
- 23:06that response will basically can be used
- 23:08by UI to show the data okay okay okay so
- 23:14what is multi- threading
- 23:16multithreading is a
- 23:19concept that allows multiple threads to
- 23:22run concurrently uh within a single
- 23:24process so whenever we have multicore
- 23:28process processors so we can leverage
- 23:31the processor uh capability so basically
- 23:34it utilizes a CPU uh
- 23:38resources efficiently by performing uh
- 23:41multiple operations
- 23:43simultaneously so each thread can
- 23:45execute a part of the program
- 23:48independently so that enables the
- 23:51parallel execution and improves the
- 23:54performance of application especially on
- 23:57the multicore for
- 23:59processors okay so what are the
- 24:01different states of threat in Java yeah
- 24:05we have a new runable blocked
- 24:09waiting and
- 24:13terminated yeah so these are the states
- 24:15we have okay okay so what are the
- 24:19various ways you can create multi
- 24:22threading in
- 24:23Java yeah there are various ways one is
- 24:27uh we can use extends
- 24:29keyword and um uh we can say with any
- 24:33class we can extend thread so we can
- 24:36create new thread by extending the
- 24:37thread class and we can override its run
- 24:41method so that is one way then we can
- 24:46also uh create a thread by implementing
- 24:49the renable interface and we can pass an
- 24:53instance of the class to a uh thread
- 24:57object
- 24:58so this is another way then we have the
- 25:02uh executor framework so the executor
- 25:06framework provides
- 25:08a uh high level replacement for managing
- 25:11threats so that allows us to create a
- 25:15thread pool and manage task execution uh
- 25:18more
- 25:19efficiently so we have executor service
- 25:22for that so yeah so these are the ways
- 25:25uh we can create the thread okay what is
- 25:27Java memory model yeah the Java memory
- 25:30model defines how threads interact
- 25:34through memory and uh how changes made
- 25:38by one thread become visible to another
- 25:41so it specifies rules for reading and
- 25:44writing variables handling threads
- 25:47synchronization and providing uh
- 25:50guarantees on visibility ordering and
- 25:53atomicity okay what are the different
- 25:56types of exception in Java
- 25:59yeah we can categorize the exceptions in
- 26:02mostly uh three parts actually one is
- 26:05checked then unchecked and then
- 26:08errors so uh checked exceptions are
- 26:12those which must be caught or declared
- 26:15in the method
- 26:17signature like uh we have IU exception
- 26:20SQL exception or file not found
- 26:23exception right so whenever we write the
- 26:26code so there itself uh the compiler
- 26:30suggest
- 26:32to uh I mean that enforce that will
- 26:35enforce us to handle it if we are not
- 26:38writing it so we write in the exception
- 26:42block like IU exception X exception and
- 26:44then we further we can continue our code
- 26:47then coming to unchecked exception so
- 26:50unchecked exception include uh runtime
- 26:54exception that do not need to be
- 26:56explicitly handled so so some exceptions
- 27:00like null pointer array out out of bond
- 27:03exception then current concurrent
- 27:06modification exception so all these
- 27:08comes under uh unchecked exception so
- 27:12this is basically going to happen at
- 27:13runtime so we cannot predict that in
- 27:17advance and then uh uh we have errors so
- 27:22the errors are the kind of we can say uh
- 27:27which we cannot handle at all so this is
- 27:31a this is an irrecoverable situation so
- 27:35which cannot be handled so and this we
- 27:38can say very serious problems and
- 27:40application uh cannot catch it so like
- 27:43out of memory error is there stack
- 27:45Overflow is there is there yeah so these
- 27:48are the various types of uh exceptions
- 27:51are there okay can you explain the
- 27:54difference between string string Builder
- 27:57and string buffer yeah string is uh
- 28:02immutable and string Builder and string
- 28:05buffer is
- 28:06mutable
- 28:07so uh basically um string once created
- 28:13its value cannot be changed in case of a
- 28:16string but in a string
- 28:18Builder uh its values can be changed so
- 28:21that is why it is
- 28:23mutable and uh string Builder is
- 28:26designed for single threaded
- 28:28uh uh use and is faster than a string
- 28:32buffer and string buffer is thread safe
- 28:36it is
- 28:37synchronized and it makes it suitable
- 28:40for multi- trading environments so it is
- 28:43uh slower than a string
- 28:45Builder so yeah okay what is the purpose
- 28:48of transient keyword in Java yeah the
- 28:51transient keyword is used to include the
- 28:55that a field should not be serialized
- 28:58when an object is serialized transient
- 29:01fields are ignored so whatever the
- 29:04suppose we have a bean class and in that
- 29:07bean class we have multiple
- 29:10properties right so out of those
- 29:14properties in if any of the properties
- 29:16have transient keyword so that won't be
- 29:20cized so that field will be ignored and
- 29:24their values are not included in the
- 29:27cized presentation okay what is the
- 29:30difference between hashmap and
- 29:32concurrent hashmap so hashmap is not
- 29:36thread safe and it can lead to uh
- 29:40inconsistent data in a multi-threaded
- 29:43environment uh while concurrent has map
- 29:46is designed for uh concurrent access and
- 29:49allows multiple threats to read and
- 29:51write
- 29:52simultaneously without locking the
- 29:54entire map so the uh locking is uh done
- 29:58only on on the particular bucket not on
- 30:02the entire U map then concurrent has
- 30:06map uh performs better uh in a
- 30:10concurrent environment uh because it's
- 30:13uh uh because uh it uses segment locking
- 30:17so that allows concurrent rights so
- 30:21concurrently writing is possible in this
- 30:24case and then uh uh in hashmap allows
- 30:28one null key and multiple null values
- 30:31while concurrent hashmap does not allow
- 30:33null keys or values okay what are memory
- 30:37leaks and how you can prevent them yeah
- 30:42memory leak in Java occurs when objects
- 30:44are no longer used but are still being
- 30:47referenced so this prevents the garbage
- 30:53collector from reclaiming the memory so
- 30:57the common causes includes static uh
- 31:00references or any long lived objects or
- 31:04improperly managed collections or we
- 31:07have not closed the connections so those
- 31:09things so we can prevent uh using uh
- 31:14weak uh
- 31:15references so uh we can use weak hmap
- 31:18for objects that can be uh garbage
- 31:21collected uh when not in use and uh we
- 31:26can avoid a static references uh unless
- 31:29it is
- 31:30necessary and also we can monitor memory
- 31:33uh uses uh with uh profiling tools like
- 31:38visual VM or J
- 31:40profiler so yeah okay what is the
- 31:44optional class in Java
- 31:478 yeah the optional class in Java 8 has
- 31:51been introduced to handle uh null
- 31:53pointer exception so earlier uh before
- 31:56Java 8 we used to write the manually we
- 32:00used to write the uh logic to handle
- 32:04null so maybe in case of string we used
- 32:07to use sing utils
- 32:10Dot and all and uh if or in case of
- 32:13other objects equal to equal to null so
- 32:16all that we used to write but now from
- 32:18java 8 onwards we don't have to write
- 32:20that so it helps us to prevent null
- 32:24pointer exception and represents a value
- 32:27that
- 32:28could be absent so we can use it when a
- 32:32method might not return a value so let's
- 32:36say we have find by ID and it is not
- 32:38returning a value may not return the
- 32:40value so we can use optional in that
- 32:42case as a uh return type of that and
- 32:46then to express the intention of uh
- 32:51possibly absent values also we can use
- 32:53it and to chain method calls safely
- 32:58without null checks we can use this so
- 33:02yeah okay what is Method referencing in
- 33:05Java 8 yeah method reference in Java 8
- 33:09are we can say it is s hand of Lambda
- 33:13expression to call a method so they
- 33:17provide a way to reference a method
- 33:19without invoking it making the code
- 33:21cleaner and more readable so we can use
- 33:25a double colon for that so any class has
- 33:30any suppose a static method so uh uh we
- 33:35can use double colon uh in front of that
- 33:38class and we can give the method name
- 33:41and like this way we can fetch that so
- 33:44yeah okay what is the difference between
- 33:46join and a subquery in which scenario
- 33:50you will prefer to use join and in which
- 33:53scenario you will prefer to use subquery
- 33:56so they used to combine data from
- 33:57multiple tables so join is used to
- 34:00combine uh Row from two or more tables
- 34:03so we can have inner join uh then we
- 34:06have left join right join then full join
- 34:09so these are the types of join we have
- 34:13so we will have the uh uh the relatable
- 34:18column between the tables and based on
- 34:21those columns we can perform the join
- 34:24operation then uh coming to subquery so
- 34:27subquery is a query nested within
- 34:32another query so we for example we have
- 34:37uh some star from something and then in
- 34:41we can write and then we can have
- 34:42another query so that query we say as a
- 34:46subquery so it can return a single value
- 34:49a list of values or a complete table
- 34:52itself so subquery can be used in select
- 34:56or from or where or having Clauses so
- 34:59normally we try not to use subqueries if
- 35:03it possible because uh they are normally
- 35:08less efficient than the joints so mostly
- 35:11we try to use joints only wherever
- 35:13possible okay what is the difference
- 35:15between having and wear clause in esql
- 35:19yeah the having and wear Clause both
- 35:22used to filter records in SQL but they
- 35:26are little bit different
- 35:28uh based on the scenarios like uh where
- 35:32Clause is used to filter records before
- 35:34any groupings are
- 35:36made uh but having Clause is used to
- 35:40filter records after the agregation so
- 35:44it basically works on the aggregated
- 35:47data like uh it is used with uh uh Group
- 35:52by uh to filter groups based on the
- 35:55aggregated function like some count or
- 35:58average so we Clause uh basically used
- 36:01to filter records based on the specific
- 36:04conditions on columns so we can write
- 36:07like select a start from employee where
- 36:09salary uh greater than uh some amount
- 36:13and whenever we have to uh use the
- 36:16having Clause so that we use we can use
- 36:20with the group by like let's say select
- 36:24some ID and then count of a star
- 36:27and that from uh employee Group by
- 36:32employee ID having count of a star
- 36:34greater than 10 so in this case we can
- 36:37use the having
- 36:39Clause so yeah okay okay
About this transcript
This page contains the full transcript of 3-7 Years Interview Experience | Java | Spring Boot | Microservices | SQL | Nagarro by Insights Instructor, generated from the public captions YouTube serves with the video. The transcript has 4,646 words across 687 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.