Blog

  • Russian Movie: Murders, Mysteries, and Mishaps

    Russian Movie: Murders, Mysteries, and Mishaps

    The provided Russian text appears to be a screenplay or transcript for a historical detective television series titled “Anna-DetectiveЪ, Season 2.” It includes dialogue and scene descriptions, hinting at multiple mysteries and interpersonal dramas unfolding in a 19th-century Russian setting. The excerpts introduce various characters, such as Anna, a detective, and involve investigations into crimes like murder and theft, alongside subplots of romance, social intrigue, and familial secrets. The fragmented nature suggests we are witnessing snippets of different episodes, showcasing a range of cases and character interactions within the season.

    Аннa-Детективъ Study Guide: Initial Investigations

    Аннa-Детективъ Study Guide

    Quiz:

    1. Describe the circumstances surrounding the duel mentioned in the excerpts. Who were the participants, and what was the outcome?
    2. What were some of the concerns expressed about the lack of crime and incidents in the town? How did some characters react to this lull?
    3. Detail the initial report regarding Ester Safyanov. What was the reason for her disappearance, and how was the situation resolved?
    4. What was Anton Andreevich doing all day, according to his conversation? Did he find what he was looking for, and what did the clues suggest?
    5. Describe the first crime scene investigated in detail. What were some of the unusual aspects or pieces of evidence found?
    6. What was the initial explanation given for Baroness von Berg’s death? What detail seemed to contradict this explanation at the first crime scene?
    7. Why did Anna Viktorovna initially believe the maid and Russia would “come to the tone”? What observation at the scene challenged this?
    8. What were some of the details surrounding the murder of Tipanova, the maid? Where was she found, and who was being questioned?
    9. Explain the significance of the letters Masha received. What did they reveal about her situation and the advice she was given?
    10. What were some of the unusual occurrences or discoveries related to the death of Anfisa, the maid at the restaurant owner’s?

    Answer Key:

    1. The duel involved an elderly French Viscount and a Russian student from commoners who were Parisian fans and had a disagreement. They shot each other in what was described as utter stupidity, but thankfully, both survived.
    2. Some characters expressed a feeling of losing their former “lightness” and worried about the lack of incidents and crimes, questioning why they had disappeared. Others, like one gentleman writing articles, were frustrated by the lack of worthwhile scandals and villainy to write about.
    3. The duty officer reported that Ester Safyanov ran away from home with the intention of a secret wedding. However, the following morning, when the young couple returned, her parents reconciled with them and gave their blessing.
    4. Anton Andreevich mentioned spending the entire day looking for someone who was missing. He did find the person, and the curious owner of a mask pointed towards the neighbors as being responsible, highlighting the common tendency to blame others.
    5. The first crime scene involved a woman with a slit throat found at a hotel. The door was locked from the inside, and while blood was present, it was in drops too far from the body and not a handprint, suggesting something unusual about how the crime occurred.
    6. The initial report indicated a woman with a slit throat was found in a hotel room. The fact that the door was locked from the inside contradicted a straightforward scenario of someone entering and committing the murder before leaving.
    7. Anna Viktorovna initially thought the maid and Russia would align because she believed the maid was the intended victim and that Russia would be involved. However, finding the revolver lying openly at the scene was noted as an interesting detail that potentially complicated this assumption.
    8. Tipanova, a 37-year-old maid, was brought to the monastery on a pilgrimage with her mistress, General Eliseeva’s widow, and was found to have been killed. General Eliseeva’s widow was being questioned in relation to her death.
    9. Masha received letters indicating that there were no decent grooms in the city and advising her to get married quickly to avoid scandal, especially given her profession as a doctor. She was also told that her literary works were highly valued.
    10. Anfisa was found murdered, and a piece of jewelry not belonging to her was discovered on the body, which the restaurant owner’s son claimed to have bought for her. There were also questions about the owner’s son’s whereabouts and his relationship with Anfisa.

    Essay Format Questions:

    1. Analyze the initial characterizations of Anna Viktorovna. What impression does the source material give of her abilities, personality, and role in the unfolding events? Support your answer with specific examples from the text.
    2. Explore the recurring themes of societal expectations and gossip within the provided excerpts. How do these forces influence the actions and concerns of the characters?
    3. Discuss the early mysteries presented in the text, such as the lack of crime, the duel, and the disappearance of Ester Safyanov. How do these seemingly disparate events contribute to the overall atmosphere and potential plot of the series?
    4. Examine the introduction of forensic details and investigative questions in the initial crime scene descriptions. What do these details suggest about the nature of the detective work that will be central to the series?
    5. Consider the various relationships hinted at in the excerpts, such as those between Anna Viktorovna and other characters, family dynamics, and romantic interests. How do these relationships contribute to the intrigue and complexity of the narrative?

    Glossary of Key Terms:

    • Детективъ (Detektiv): The old Russian spelling of “detective,” indicating the genre of the series.
    • Дуэль (Duel): A formal combat between two people using lethal weapons, often to settle a point of honor.
    • Губернатор (Governor): The chief executive of a Russian province or region.
    • Благотворительный комитет (Blagotvoritel’nyy komitet): A charity committee, an organization dedicated to philanthropic work.
    • Императорское человеколюбивое общество (Imperatorskoye chelovekolyubivoye obshchestvo): The Imperial Philanthropic Society, a major charitable organization in Imperial Russia.
    • Мещанка (Meshchanka): A woman belonging to the class of townspeople or commoners in pre-revolutionary Russia.
    • Следователь (Sledovatel’): An investigator, particularly in a legal or criminal context.
    • Уездный город (Uyezdnyy gorod): A district town, an administrative center of a smaller territorial unit within a province.
    • Фельдшер (Fel’dsher): A medical assistant or paramedic, often providing primary healthcare in rural areas.
    • Морг (Morg): A mortuary or morgue, a place where dead bodies are kept for identification or before burial.

    Zaton Investigations: Season Two

    This briefing document summarizes the main themes, ideas, and facts presented in the provided excerpts from “01.pdf.” The text appears to be a transcript or script from the second season of a Russian historical detective series, “Anna-Detective.” The excerpts jump between various scenes and conversations, making it necessary to synthesize the information into overarching themes and plot threads.

    Main Themes:

    • Investigation of Multiple Crimes: The central theme revolves around the investigation of several seemingly disparate crimes occurring in the town of Zaton. These include the murder of a maid (Tipanova), Baroness von Berg, and a young woman named Anfisa.
    • Intrigue and Suspicion: The atmosphere is thick with suspicion, with multiple characters appearing to have secrets, motives, and potential involvement in the various crimes. Misunderstandings, rumors, and hidden agendas contribute to the complexity.
    • Social Dynamics and Class Distinctions: The conversations reveal the social hierarchy and interactions between different classes, including nobility, merchants, doctors, servants, and commoners. Social expectations and scandals play a role in the unfolding events.
    • Relationships and Romantic Entanglements: Various forms of relationships – romantic, familial, and professional – are explored. Jealousy, betrayal, and the complexities of love and marriage feature prominently as potential motives for criminal actions.
    • The Supernatural and the Rational: While the series has a detective element rooted in logic and investigation, there are also hints of the supernatural or at least superstitious beliefs influencing the characters’ actions and interpretations of events (e.g., dreams, fortune-telling, mentions of spirits and curses).
    • Justice and the Pursuit of Truth: The detectives, particularly Anna Viktorovna, are driven by a desire to uncover the truth behind the crimes and bring the perpetrators to justice, despite the obstacles and deceptions they encounter.

    Most Important Ideas and Facts (Organized by unfolding plot threads):

    1. The Murder of the Maid (Tipanova) and Baroness von Berg:

    • A maid, Tipanova (37 years old), was found murdered, having been brought to the monastery on a pilgrimage with General Eliseeva’s widow.
    • A witness mentions seeing a “woman with slit throat found hotels nightmares.”
    • Another description of a body: “woman with slit throat found hotels nightmares iso da.”
    • Baroness von Berg was also murdered. Mr. Apraksin is a suspect in her murder and that of Aglaya Stepanova.
    • Evidence includes a fresh bullet wound on Apraksin and his presence at the Baroness’s house.
    • The door to the Baroness’s room was locked from the inside.
    • A “MGTS” (likely referring to a telephone line) is mentioned in connection with how the criminal might have left.
    • A thread or “Don lard” with a special knot was found behind the door.
    • Blood drops were found that were not handprints and were far from the body.
    • Anna Viktorovna and Anton Andreevich are investigating these murders.
    • Anton notes, “for several years now nothing is happening in the city, everything is quiet,” indicating a recent disruption of peace.
    • Anna states, “In the evening maybe we can sit and play chess remember our was her adventures Anton Andreevich, all this is in the past already.”
    • The spirit of Baroness von Berg is seemingly invoked for information: “spirit of Baroness von Berg and the whole world spirit Baroness von Berg me hotel semi I ask you speak out when did it come who killed you.”

    2. The Murder of Anfisa:

    • A young woman named Anfisa was murdered. Her body is in the morgue.
    • She was supposed to get married.
    • A coin was found in her boot, a tradition for wealth in marriage.
    • She was wearing a light dress and new boots.
    • The murder weapon has not been found.
    • The door was locked from the inside.
    • Evidence suggests the blood drops were not a handprint.
    • Several individuals are suspected in Anfisa’s murder:
    • Golubtsov Fedor: Mentioned in connection with jealousy as a motive. His son might have been involved with Anfisa.
    • Golubtsov’s son was away in the village with provisions on the night of the murder.
    • Golubtsov admits to buying jewelry for Anfisa.
    • Adamov: His revolver might have been used in the murder. Dr. Mills examined it and found it was recently fired.
    • Adamov suggested a date with Anfisa before her death.
    • Faisal (Peter Soloukhin): Confesses to killing Anfisa, driven by the belief that she was a witch who caused the deaths of his wife and son after predicting them through fortune-telling with cards. He used a silver bullet based on a mystical book.
    • He waited for the “right opportunity” and used Adamov’s temporarily left revolver.
    • He knew Anfisa would be in the park that evening because Fedor Golubtsov let it slip, and Vladimir (possibly Golubtsov’s son) boasted about it.
    • Anfisa was fortune-telling with cards for money, which made her unpopular with some people.
    • The murder occurred between 9 and 11 o’clock in the evening, according to Dr. Mints.
    • Silver bullets are identified as the murder weapon, cast from a fork from the restaurant owned by someone (possibly Adamov, given the revolver connection).

    3. Other Notable Events and Characters:

    • A Duel: A duel occurred between an elderly French Viscount and a Russian student over Parisian fans.
    • Elopement: Ester Safyanov ran away from home with the aim of a secret wedding but returned in the morning.
    • A Dog Thief: There’s a mention of a dog thief, with the reasoning that “he who today stole a calf tomorrow will steal bk.”
    • Ryabushinsky: A writer whose articles are discussed, including one about a duel and another potentially libellous one about Anna Mironova.
    • Anna Mironova: A character who has returned to Zaton after a long absence. Her return seems to coincide with the increase in criminal activity and is viewed with suspicion by some. She is also a writer for a ladies’ magazine and is knowledgeable about ancient Egypt.
    • Dmitry Aristarkhov: Arrested for the murder of Iraida Suslova, a participant in a terrorist faction. He initially refuses to cooperate but later confesses. He had made a mummy out of her body.
    • Pavel Martynov from Petersburg is involved in this case and seemingly dictates Aristarkhov’s confession.
    • Iraida Suslova: A member of a terrorist organization who was in hiding for seven years after an assassination attempt.
    • An Auction: An auction featuring Egyptian antiquities takes place, where a mummy is a key lot. This event intersects with the investigation of Dmitry Aristarkhov and Iraida Suslova. Mr. Golenishchev, a famous Egyptologist, attends.
    • Praskovya (a housekeeper): Reveals information about a past murder involving Andrey Chern and Tatyana, whose body was moved to the basement. This seems like a separate, older crime being uncovered.
    • Doctor Glebov: Deceased. His widow, Antonina Glebova, is a character in the narrative, and there are suggestions of foul play in his death, initially thought to be accidental.
    • Anastasia Petrovna: Involved in a complex situation involving her husband, a child named Sasha, and potentially a murder. There are hints that she might have killed Doctor Propane.
    • Yakov Platonovich: A judicial investigator and a recurring figure involved in the various investigations.

    Quotes Highlighting Key Ideas:

    • On the nature of Zaton: “for several years now nothing is happening in the city, everything is quiet” – This sets the stage for the disruption caused by the recent crimes.
    • On suspicion: “always at the neighbor’s cow the udder seems bigger” – Reflects the general atmosphere of suspicion and tendency to suspect others.
    • On the detective work: “reveal no more incidents there are no crimes, so why did it disappear?” – Shows the detectives grappling with the lack of obvious cases before the surge of murders.
    • On the supernatural: “spirit of Baroness von Berg and the whole world spirit Baroness von Berg me hotel semi I ask you speak out when did it come who killed you” – Demonstrates the intersection of the rational investigation with possible beliefs in the supernatural.
    • On motive (Anfisa’s murder): “jealousy is quite logical why not” – Highlights a common motive explored in the investigations.
    • On confession (Anfisa’s murder): “the witch only knows silver that wait for the right opportunity” – Reveals the killer’s motive and method based on superstitious beliefs.
    • On the past returning (Anna Mironova): “for many years we read you are dead and then suddenly you appear alive and well so please explain why didn’t you send a message or a letter telegram anything any message after all, you couldn’t help but understand how she deeply suffers” – Indicates the significant and perhaps disruptive nature of Anna Mironova’s return.
    • On the nature of truth: “believe what do I believe when they tell me the truth” – Underscores the difficulty in discerning truth amidst the many lies and secrets.

    Overall Impression:

    The excerpts provide a glimpse into a complex and engaging detective series set in 19th-century Russia. Multiple interconnected and seemingly separate crimes are being investigated, with a large cast of characters, each with their own secrets and potential connections to the events. Themes of social dynamics, relationships, and the interplay between rational investigation and superstitious beliefs create a rich and intriguing narrative landscape. The return of Anna Mironova and the unfolding details of the mummified Iraida Suslova add layers of mystery and intrigue to the already convoluted web of crimes.

    Anna-Detective Season 2: Themes and Case Insights

    Frequently Asked Questions: Themes and Ideas in “Anna-Detective” Season 2 (Excerpts)

    1. What kind of cases does Anna Viktorovna investigate in this season?

    Anna Viktorovna continues to engage in a variety of intriguing cases, ranging from apparent disappearances and sudden illnesses to outright murders. The excerpts hint at investigations involving a runaway bride, a dog thief, a mysterious duel, the death of a maid, the murder of a woman with a slit throat in a hotel, the poisoning of a doctor, and the suspicious deaths of a maidservant named Anfisa and a widow named Glebova. These cases often involve complex circumstances, hidden motives, and a colorful cast of characters within the Zatonsky setting.

    2. What is the nature of Anna Viktorovna’s relationship with Anton Andreevich?

    Anna and Anton maintain a close and collaborative relationship as they work together on their investigations. There is a clear sense of mutual respect for each other’s abilities, with Anton often seeking Anna’s insights and relying on her deductive skills. Their interactions suggest a deep-seated friendship, and while romantic undertones may have been present in the past, their focus in these excerpts appears to be primarily on solving crimes. They share information, discuss clues, and support each other in their endeavors.

    3. What are some of the social dynamics and concerns reflected in the excerpts?

    The excerpts offer glimpses into the social fabric of the time, revealing concerns about reputation, social standing, and morality. There are mentions of scandals, gossip, and the importance of public perception, particularly regarding women. The discussions about marriage, appropriate behavior for ladies, and the presence of “indecent grooms” highlight societal expectations. Additionally, the involvement of charitable societies and the reference to building a school for peasant children suggest an awareness of social welfare and philanthropy.

    4. How is the supernatural or the unusual intertwined with the investigations?

    While the series is described as a Russian detective series, there are recurring hints of the supernatural or at least the perception of it. Characters discuss dreams and their potential significance. There are references to curses, witchcraft, and the belief in spirits influencing events. In one instance, Anna is asked to communicate with the deceased. This interplay between rational investigation and potential supernatural elements adds a unique dimension to the narratives.

    5. What recurring motifs or clues are present across the different case snippets?

    Several recurring motifs and potential clues appear across the excerpts. Locked rooms are mentioned in multiple murder investigations, suggesting a possible element of deception or a specific method employed by the killer. Specific objects like revolvers, knives, and a piece of jewelry become focal points in different cases. Blood evidence, including its placement and type, is also scrutinized. Furthermore, the repeated mention of individuals lying or concealing information hints at the underlying secrets that drive the plots.

    6. How are themes of love, jealousy, and betrayal explored in these excerpts?

    Emotions like love, jealousy, and betrayal seem to fuel many of the conflicts and crimes depicted. The runaway bride eloping for a secret wedding, the duel fought over Parisian fans, and the suspicion of a husband killing his wife’s maid due to jealousy all point to the destructive power of these emotions. Betrayal is suggested in instances where characters are suspected of lying, concealing their whereabouts, or acting against the interests of others. These personal relationships and the emotions tied to them are often central to uncovering the truth behind the crimes.

    7. What role do other characters, besides Anna and Anton, play in the unfolding events?

    A diverse range of supporting characters contribute to the narratives. There are law enforcement officials like duty officers and inspectors, medical professionals like doctors and surgeons, and various individuals connected to the victims or suspected perpetrators. These characters provide information, become suspects, offer assistance, or create obstacles for Anna and Anton’s investigations. Their testimonies, secrets, and interactions are crucial in piecing together the truth in each case.

    8. What is the overall tone and atmosphere conveyed in these excerpts?

    The excerpts create a tone that is both engaging and suspenseful, typical of a detective series. There is a sense of intrigue and mystery surrounding each case, prompting the reader to want to know more. The dialogue is often brisk and informative, revealing clues and character dynamics. Despite the serious nature of the crimes, there are moments of social commentary and interpersonal drama, adding layers to the overall atmosphere of the series. The setting of Zatonsky appears to be a place where secrets and unexpected events are commonplace.

    Anna-Detective: Russian Historical Mystery Series, Season 2

    The source provided are excerpts from a Russian historical detective series titled “АННА-ДЕТЕКТИВЪ. 2 сезон” (Anna-Detective, Season 2). This immediately indicates that it is indeed a series, with at least two seasons. The genre is described as “Русский детектив” (Russian detective).

    The historical setting is suggested through various elements in the dialogue and descriptions:

    • Social conventions and titles: Characters address each other with formal titles like “Nikolaevich”, “Andreevich”, “Anna Viktorovna”, “General Eliseeva”, “Baroness von Berg”, “Mr. Apraksin”, “Madam Mironova”, and “Mr. Klyuev”. There are mentions of nobility and social events like balls and noble assemblies.
    • Professions and roles: The presence of a “duty officer”, “doctor”, “judicial investigator”, “navigator”, “gatekeeper”, “maid”, “clerk”, “police”, and “detective department” are indicative of the time period. The mention of a “telegraph” and “electricity” provides technological context.
    • Crimes and investigations: The excerpts are filled with discussions of various crimes, including:
    • A missing person.
    • Theft (dog, calf).
    • A duel.
    • A murder of a maid, Tipanova.
    • The murder of Baroness von Berg.
    • The murder of Anfisa Luzhina.
    • The suspicious death of Mrs. Glebova.
    • The case involving Dmitry Aristarkhov and a mummy.
    • Detective work: The characters engage in various aspects of detective work:
    • Questioning witnesses and suspects: Numerous dialogues involve characters asking questions, seeking information, and trying to uncover the truth.
    • Examining evidence and crime scenes: There are references to finding a revolver, bloodstains, a knife wound, a piece of jewelry, monastic clothing, and the state of a locked room. The investigation of Aristarkhov’s basement and the discovery of caustic soda and a hidden room suggest detailed crime scene analysis.
    • Developing theories and hypotheses: Characters propose different explanations for the crimes, such as the involvement of an evil spirit, jealousy, a desire to prevent a marriage, and secret missions.
    • Seeking expert opinions: The involvement of a doctor to examine bodies and wounds and an Egyptologist to analyze a mummy demonstrates the use of expert knowledge in the investigations.
    • Following leads and gathering information: Characters discuss going to different locations like hotels, monasteries, estates, taverns, and shops to pursue their investigations.

    Recurring characters and plot lines:

    • Anna Viktorovna: The title itself suggests she is a central character, likely the primary detective. Her interactions with other characters, involvement in multiple cases, and references to her “extraordinary gift” support this.
    • Anton Andreevich: He appears frequently in conversations with Anna Viktorovna and is referred to as a “judicial investigator” and her “assistant”, indicating a significant role in the detective work. Their dialogues often reveal their investigative process and past experiences.
    • Recurring cases: While several distinct crimes are mentioned, the excerpts often jump between different investigations, which is typical for an episodic series. However, the reference to “АННА-ДЕТЕКТИВЪ. 2 сезон” suggests that there might be overarching plotlines or character development across the seasons. The reappearance of characters like Yakov Platonovich and discussions about past events hint at continuity.
    • Personal relationships: The interactions between characters also suggest ongoing personal relationships and potential subplots, such as the dynamic between Anna Viktorovna and Anton Andreevich, and the various romantic entanglements and family issues that become part of the crime investigations.

    In summary, the source excerpts clearly depict a historical detective series, “Анна-детективъ,” set in Russia, likely in the late 19th century based on the social context and technology mentioned. The series follows various crime investigations conducted by characters like Anna Viktorovna and Anton Andreevich, showcasing elements of mystery, deduction, and interpersonal drama within a historical backdrop. The presence of “Season 2” and recurring characters confirms its status as a series.

    Mrs. Mitrofanov’s Missing Italian Greyhound

    Based on the sources, there is a mention of a missing Italian Greyhound belonging to a Mrs. Mitrofanov. The text indicates that “special signs” of the dog were being noted. Unfortunately, the excerpts do not provide any further details about when the dog went missing, the specific special signs, or whether the dog was eventually found.

    Duel in Paris: Viscount and Russian Student

    Based on the sources, there is a mention of a duel that occurred between a French Viscount and a Russian student. Here are the details provided in the excerpts:

    • The duel involved two individuals: an elderly French Viscount and a Russian student from commoners.
    • The reason for the duel was that the “Parisian fans something not shared”. The specifics of what they disagreed about are not mentioned.
    • The duel involved shooting at each other.
    • The narrator of this part of the conversation considered the duel to be “utter stupidity”.
    • It is mentioned that “Thank God the words are still alive”, implying that neither of the participants died in the duel.
    • A character was in the country and knew nothing about the duel and the lack of advances from someone for a week.
    • A Mr. Ryabushinsky apparently wrote about the duel, and a Mr. Mushinsky also commented on it, with someone feeling that Mushinsky “always makes a mountain out of a molehill”. This suggests the duel was a topic of some discussion or possibly even public interest.
    • Someone was angered by an article related to this and demanded that a “she” immediately returned home. It is unclear who “she” is and what her connection to the duel was.

    In summary, the sources detail a duel in Paris between an elderly French Viscount and a Russian student, stemming from a disagreement among Parisian fans. The duel was considered foolish, and thankfully, both participants survived. The event was written about by Ryabushinsky and commented on by Mushinsky, causing some level of reaction and a demand for someone’s return home.

    A Woman Doctor: Scandal and Skepticism

    Based on the sources, the idea of a woman being a doctor appears to be associated with scandal and is met with surprise and skepticism. Here’s a breakdown of the relevant information:

    • One character, Masha, identifies herself, followed by the remark “but a woman is a doctor, that’s just it some kind of scandal they follow quickly get married“. This suggests that a woman pursuing a medical career was considered unconventional and could lead to social scrutiny or pressure to marry quickly, possibly to avoid further scandal.
    • Another character explicitly states their old-fashioned view: “I humbly ask you to truchen I am a human being old-fashioned I can hardly imagine woman as a doctor“. This highlights the societal prejudice and the difficulty some people had in accepting women in the medical profession.
    • The presence of a female doctor seems to draw attention. When “Anna Viktorovna came for knowledge on the screen and the doctor there are people gathered what a people ah that’s what to hide“, it implies an unusual gathering or perhaps a sense of something hidden or extraordinary related to her presence as a doctor.
    • It is noted that Anna Viktorovna “studied medicine in paris with seal I admit it’s very rare to meet young amazing woman in russian provinces he really wanted this to change“. This confirms that female doctors were a rarity in the Russian provinces, which could contribute to the perception of it as something scandalous or at least noteworthy.
    • A misunderstanding occurs when someone refers to a woman as a doctor, and another character corrects them, saying “erase mistake it must be maids“. This mix-up indicates an assumption that women would more likely be maids than doctors, further illustrating the societal norms and the unexpected nature of a female doctor.

    In summary, the sources suggest that in the historical context of the series, a woman being a doctor was viewed as something unusual, potentially scandalous, and hard for some people to accept. It went against the prevailing societal expectations, where women were more commonly seen in roles like maids rather than in professional fields like medicine. The rarity of female doctors in the Russian provinces likely contributed to this perception.

    Ongoing Murder Investigations

    The sources contain several ongoing murder investigations, showcasing the detective work of characters like Anna Viktorovna and Anton Andreevich. Here’s a breakdown of the different cases discussed:

    • The Murder of Aglaya Stepanova and Baroness von Berg:
    • Victims: Aglaya Stepanova (a maid, 37 years old) and Baroness von Berg.
    • Initial Circumstances: Aglaya was found dead in the monastery, brought there on a pilgrimage with her mistress General Eliseeva’s widow. The gatekeeper heard noise at dawn on the second floor but found everything quiet. The maid didn’t answer, and the doors were broken down, with the body found inside a locked room. Baroness von Berg was found murdered after Anna Viktorovna visited her.
    • Suspected Cause of Death: Aglaya was stabbed to death, and it looked like she tried to draw something (a rooster) with blood before she died. Baroness von Berg was killed with a sharp cone-shaped knife, possibly a large icicle that melted, explaining the missing murder weapon. She also had a cut on her stomach, and her internal organs were extracted and dried, leading to theories involving Egyptian embalming techniques.
    • Potential Suspects and Leads:Ivan Apraksin: He is arrested as a suspect in both murders, with a suspected motive related to Baroness von Berg rejecting him. He had a fresh bullet wound, and the hostess confirmed he was coming in the morning for the second night in a row.
    • General Eliseeva’s Widow (Irina Alekseevna): She was questioned about Aglaya.
    • A young man (17 years old) living with Irina Alekseevna: He was questioned.
    • The clerk Matveyev: There is speculation that Aglaya might have revealed secrets to him.
    • Alexey (the clerk Matveyev): Believed by some to have killed Aglaya, possibly planting evidence.
    • Dmitry Aristarkhov: A student arrested in connection with Baroness von Berg’s murder due to the discovery of caustic soda in his basement and his knowledge of Egyptian embalming. The victim in his case was identified as Iraida Suslova, a participant in a terrorist faction.
    • Evidence and Clues:A drawing of a rooster in blood found near Aglaya’s body.
    • A revolver found under the bed, possibly used recently.
    • Monastic clothing found on a suspect.
    • Missing jewelry from Baroness von Berg’s residence.
    • A secret letter.
    • A piece of thread with a special knot found near Aglaya’s body.
    • Blood drops too far from Aglaya’s body to be from splattering.
    • The victim drawing a rooster head on the wall with her blood, possibly pointing to the killer or drawn by the killer.
    • The locked room and window latch at Aglaya’s murder scene.
    • The manner of Baroness von Berg’s death suggesting a non-metallic, cone-shaped weapon, later theorized to be an icicle.
    • The discovery of caustic soda and a hidden room in Dmitry Aristarkhov’s basement, along with a dried, mummified body.
    • A scar on Iraida Suslova’s body, mentioned in Ryabushinsky’s article.
    • The Murder of Anfisa Luzhina:
    • Victim: Anfisa Luzhina, a maid serving Mr. Klyuev.
    • Initial Circumstances: Found murdered.
    • Suspected Cause of Death: Shot with a revolver.
    • Potential Suspects and Leads:Mr. Golubtsov’s son (Fedka): A piece of jewelry belonging to Anfisa was found at his place, and he admitted to buying it from a jeweler and giving her some gold. He was supposed to have been at a tavern but his alibi was questioned.
    • Vladimir Gamov: Detained at the cemetery. He had a revolver, which he initially lied about having on the night of the murder. He had a motive as Anfisa was going to marry someone else (Raffia).
    • Fedor Golubtsov: Let slip that Anfisa would be in the park that evening.
    • Soloukhin (Peter): Confessed to killing Anfisa with a silver bullet because she had predicted his wife’s and son’s deaths and he believed she was a witch. The silver bullets were cast from forks from Golubtsov’s restaurant.
    • Evidence and Clues:A revolver.
    • Love letters signed by “Mazi” found in Anfisa’s room.
    • A coin found in Anfisa’s boot, a sign she was preparing to get married.
    • A piece of jewelry bought by Golubtsov’s son.
    • The murder weapon being silver bullets.
    • The Suspicious Death of Mrs. Glebova (Antonina Gleb):
    • Victim: Antonina Glebova, the widow of a doctor.
    • Initial Circumstances: Found dead, initially suspected as suicide.
    • Suspected Cause of Death: Killed violently by being hit on the head and thrown into a ravine.
    • Potential Suspects and Leads:Baranov (the coachman): Suspected of murder, possibly in connection with the death of his wife and the doctor. He was seen the day before her death.
    • Agafya (a maid): Tried to burn papers belonging to Doctor Glebov. She was pregnant and lost her child, blaming Antonina Glebova.
    • Evidence and Clues:An elongated hematoma found on the doctor’s body earlier in the spring.
    • Missing medical tools from the doctor’s office.
    • The discovery of Antonina Glebova’s body with a head injury.
    • Agafya’s attempt to burn papers.

    These cases illustrate the diverse nature of the murder investigations within the series, involving different motives, methods, and a range of suspects and clues that Anna Viktorovna and Anton Andreevich (among others) work to unravel. The recurring theme of societal issues, personal relationships, and the pursuit of justice is evident in these investigations.

    https://www.youtube.com/watch?v=V39uT-9K8A0
    ДОЛГОЖДАННОЕ ПРОДОЛЖЕНИЕ! ИСТОРИЧЕСКИЙ СЕРИАЛ. АННА-ДЕТЕКТИВЪ. 2 сезон. 1-8 Серии. Русский детектив.

    The Original Text

    A yes come in how did you sleep young lady, did you dream? what otherwise why did you ask, it’s Friday after all and a dream on Friday things I wish you good health, Nikolaevich, and not to you either. get sick from Andreevich something doesn’t add up at all seas today rest let me see and here they will dump something like this to ruin for sure Jack of diamonds goes to houses before thoughts lost their speed and did not say nikolai vasilich do you know I have the same feeling that we we just lose our former lightness reveal no more incidents there are no crimes, so why did it disappear? Italian Greyhound Mrs. Mitrofanov’s special signs here are like this all Unfortunately, the duty officer reported tonight came almost ester safyanov yes yes what ran away from home with the aim of a secret wedding Shumel direct figure out can I but In the morning when the young people returned it melted and blessed them in that case what will i do and rare get busy or else you’ll rub I’m sure you will if you can handle this matter, I will find it dog thief because he who today stole a calf tomorrow will steal bk I wonder who the artist is at all some famous matiz didn’t dare to talk about I don’t know, but for me his trait is much better tell me about the duel ok sasha so what tell here 2 and Parisian fans something not shared one elderly French Viscount another Russian student from commoners they shot each other, it was utter stupidity Thank God the words are still alive and what about her night I was in the country she knew nothing about the duel and none of them advances for a week but Ryabushinsky wrote You never know what this Mushinsky wrote the gentleman always makes a mountain out of a molehill I would have already turned white with rage when I counted his article and demanded that she immediately returned home arrested only six months left until the end of the courses I’m Masha, but a woman is a doctor, that’s just it some kind of scandal they follow quickly get married while i’m not a beauty public a message there are no decent grooms in the city order moreover she won’t hear anything doesn’t want to get married year so that Paris did not pass for lasdorf Anna Viktorovna I give you an excellent rating thank you, then it can be sewn Anna Viktorovna, they are waiting for you outside. ok natalia decks Well, I’m so glad to see you. I’m going to Moscow in po affairs imperial philanthropic society so I decided to make a stop in Zaton well how do you miss paris oh i do terrible besides mode for like me too Of course I missed it, now I’m used to it and then you know people seeing that help is needed at least paris zatonsky this is right this That’s right, but I see you’re healthy. the deceased are busy with a blanket and the rest the Lord has already managed for you office to you letter thank you kindly that I am stepping kindly towards you you will allow of course i love let announcement one lady sail to take care of her at in the yard tomorrow she will be zadonsk No, well, I must say what a story will have to stay a few more days on tar are full how kind you are we are ready to help in everything if it is indicated I’m not an angel at all, it’s just that good though somewhat delicate well how woman as mother i cant become a branch and I don’t want to listen to anything this person doesn’t guilty must be acquitted but baroness water the matter of clapping will require funds for keel problems don’t worry please I I’ll invite the best one what a stupid thing to save up for your eyes and what is good about you in me now Darling, this is smelling salts helmets type ac tell me what you have happened maybe I can help you help with something I have given moose part a thousand times asking for the word came to Petersburg answers according to laws it’s not surprising who you are talking about is busy storms yakov platonovich who are you have to Mauro is wider but you know it seems to me to you now 1 you can’t give up matilda torso and u I have very good connections at court. I’ll try to help you but what do you agree with? then we are great and you don’t need to cry Well my dear I won’t see you again such mike album not ideas i tomorrow I will organize a meeting of the local charity new committee and I will be happy if you you’ll come, but it’s a pleasure well then see you tomorrow A he should say that the dress is his sister’s I have great mercy for you, I shout at yours request when you will gain from the flesh or hats all bills for them be kind it came you don’t know uncle I’m not okay here you have many reasons to change hats and outfits you are taking advantage of the generosity of peter ivanych Annushka while I was playing his song did anyone give me no no in any way In this case, I will remain faithful to the memory of the divisions although in connection they say that I married for calculation however kazan so I was to her I didn’t write here that I’m really attached couple page love want read no ulm, of course I’m very glad that yours and literary works are highly valued in ladies magazine but sorry i have to work my opuses thank you very much, I don’t dare stop you listen and so what if not passionate desire and not such love in quiet moments and dream It seems like a woman’s heart and what do you want, he was met with little understanding maybe they have become hardened and mired in business or just club who are so late 60 lungs on the way to the forest broke down had to end up at the inn the main thing is that they came to collect the money and not to help we ate liberties didn’t save let’s go tomorrow morning you’ll wake us up and hurt us how beautiful thank you nature is awakening Spring is just around the corner, how are you, Anton? Andreevich I don’t count hours except for happy ones by the way you know you get bored more and more and the devil knows what I spend my detective money on abilities yesterday for example all day I was looking for the missing one and did you find the damage? you know, I must say, it turned out to be the curious owner of this mask is all pointed to the neighbors, they say, they sent except or well always at the neighbor’s cow the udder seems bigger and I personally think that If my neighbor’s wall is on fire, then that’s it. my business and what do you think stole the dog lovers and daughters then he then return and earn favor little one to his beloved later ask for her hand and heart as well obvious stories and you are not injured by the ear came to stitch up doctor news tried to you to us Anna Viktorovna, what are you doing today? In the evening maybe we can sit and play chess remember our was her adventures Anton Andreevich, all this is in the past already. the famous estimate and the work of the prince of darkness are one feels however however you are all right it’s in the past and thank God to look how good it seems for several years now nothing is happening in the city, everything is quiet and it’s just anton andreevich I barely found you, what happened Anton? Andreevich murder anna viktorovna i i am forced leave you for us crime party we are all good Chapter XII Why so early, well, they don’t say the bastard follows as if from a nail the guest was on the fence sticking out again I climbed into the monastery garden but not there on the map with wet apples old stand you have such a thing here, Reggie, and not go to someone else’s garden more often and pick apples have you heard, sister? and now but clearly woman with slit throat found hotels nightmares iso da where are you everything you have to do the most they victor mironov letter separately to hand over into one’s own hands to the cross from hotels on the front of the war he was not ordered say name I don’t know myself tall thin important we look today in the city I arrived, okay, go Hello Anna Victor Strange Nikolaev’s power sex and where is their doctor? Well, you yourself did it. new crime scene is completely correct I forgot, well, I’ll come back another time. I just can’t breathe in my chest in hospitals it is given to the shoulder blade I humbly ask you to truchen I am a human being old-fashioned I can hardly imagine woman as a doctor so you sleep as soon as he does appeared immediately after that in the chest and extreme embarrassment learned well that’s all it’s clear that it’s clear your nerves are like hell, Nikolaevich, you’re tender here you go, drink this now I still have a drop for you but still you Please go to the doctor in a few days we’ll see you alexander francevich thank you killed eye tipanova maid 37 years old brought to the monastery on a pilgrimage together with his mistress General Eliseeva’s widow was questioned in the light the gatekeeper heard at dawn noise on the second floor rose to check but everything was quiet in the morning she will come pilgrims the maid didn’t answer, the doors were broken down there they broke the corpse until the door was closed from the inside on the window latch too they opened in the city, rumors have already spread that there was an evil spirit involved here, well, he is evil spirit or good then we will figure out why the area is not cordoned off date wells of the project all left and and you I’ve been waiting here for half an hour already, what is this? you know that the killer is very often returns to the scene of the crime true-true what did he say alexander francevich wait we’ll be caught red-handed here He what are you doing, Victor? it’s not much easier anymore It’s amazing, this is modern science medicine all these new discoveries are simply amazing imagination genetics heredity hypnotism hygiene about 8 from whom glass of leash this morning axis to me came to the department with a new appointment sir navigator I almost got off my chair and services do you they didn’t say anything sir what are you doing here slowly raise your hands police immediately throw him up like that slowly or immediately you decide throw her cage I can’t important evidence what is he I welcome you from the speech leave the text again. why are you frozen like a ghost saw you alive and in the crisis la perla drowning or is it agreed to get fat tail no allowance and volume red to discharge alikhan phrase and you are not at all changed just as young and beautiful what kind of evidence did you find revolver one under the bed they shot from it perhaps quite recently with a pony navigator let me ask what yours are powers to investigate this case new appointment antonovich submitter all sir that on them fleet night is designated for the position of a judicial investigator in the city of Zadonsk satisfied gentlemen, you are already wonderful, then we are again together this event will definitely need to be mark but now let me get to it we will accept our responsibility of course extra where have you been all this time why haven’t you informed about themselves I think we will have more it’s time to talk about this, let’s talk now let’s take care of the girls, gentlemen what can i say judging by the character wounds and the depth of the wound, although of course none not suicide and definitely stabbed to death it looks like she was trying to draw I wonder why the rooster if it’s like this in this way she wanted to point to the killer was it easier to write the first or last name or the picture was drawn by the killer so that Now you asked me a question about leaving hotel through the front door it’s risky there the gatekeeper is sitting, I think the killers have escaped a thread through a hundred windows usually black ones are usually eaten from Monastic robes are sewn so cleverly No one ever pays attention to the blueberries attention for the average person they are all the same the face is also a hook and monastic in the vestments I confess I excluded I am glad that we we will work together again and I am not happy not at all happy for many years we read you are dead and then suddenly you appear alive and well so please explain why didn’t you send a message or a letter telegram anything any message after all, you couldn’t help but understand how she deeply suffers if they gave themselves know about each other Libyan reasons and let me not dedicate us to them as for my relationship with anri crani it doesn’t concern you, everything concerns you she’s thunder my friend she’s dear and a person close to me and you I’m glad to hear it I’m somehow more subtle, but at least a couple of words for my readers your mystery and not less than 5 years ago back to business so much amount now you simply have to give an explanation differently subject I’ll go gossip I’m not afraid to eat but if you insist on an explanation served in different cities of Russia was performed choose well have mercy here such an explanation is the same as nothing why do you see nothing else I’ll say it’s better if you tell me how it goes things are like platon of all flat he is worse nowhere for all five years not a single one worthwhile scandal and villainy to write there is absolutely no creation of the world start the investigation you try me I’m sure with your talents you can do it there too find the scoop This because of me letter you today there is no tower no from confident she and kind ones too I didn’t get any letters, no sir there is nothing school for you welcome soda how can i help i will rip this letter Masha Masha Masha it’s pointless listen to Talmyn in the city he received here is the appointment for a long time sooner or later they will meet anyway and we will be late he knows give it to me I’ll decide what to do by doing this you make yourself look like a boss families and in fact I will give you I don’t care about me or my daughter since I am not here, I will now enter it would you be constantly busy perhaps there is some sense in this Three months have passed already, there will be passion from the ladies whether following no one remembers yes you are right better to be in paris than with this mister what a hard time this has brought half first question as a criminal penetrated into Seville I think it’s quite obvious that he’s a killer I knew that the maid and Russia would come to the tone was already waiting for the victim here he could hide anywhere, even in in this closet and where did you find the revolver it was lying here open well that’s interesting interesting another as the criminal left the cell Locked from the inside, probably MGTS, please I was being tested it could be that any ways mass thread with with a special knot or Don lard here she is I found her right here behind door you didn’t even notice, something else is bothering me this blood is not a handprint and the drops and they are too far from the body well that is, the blood could not have splattered 5 far perhaps the maid shot in self-defense she came up in that case we had to find a field but she is nowhere to be found and there are no traces so there are bullets in the killer’s body here is the beginning of my mistress after death General this proxy to welcome the widow on young men scarves are for what kind of man what man young man beardless milk on lips not dried up 17 years old he cerato foundling decanter you say so I know how to cut it cockfighting big hunter irina Alekseevna gave him money and already I was scrolling through it there and a week ago she You refused him the house What do you think about the maid? writes how I’m also looking for Aglaida right away I wanted to figure out the owner first to form from since she lost her head a still in the head before death I drew a chicken head on the wall with blood from just a witch body to a killer from my pointer to Irina Lexina how long have you been serving? Stepanova was killed above, almost managed to do so you know how to get attached now it’s hard to find a good crooked no i don’t I know, tell me, have you already reported it? relatives of arus tonics they are not she was left very lonely all the time life in service rule and maybe some girlfriends or maybe heartfelt interest may God be with you my Aglaya was decent valley of all she already summer girlfriends you already there was no our house stands alone After my husband’s death, I rarely accept anyone yes, I myself very rarely you are not with anyone else was to bring down on friend not flu forest not you’ll find it, because I’m kind I’m ready for an official conversation allow me of course and who is this gentleman judicial navigator? investigator I am also handling this case where your to the maid revolver and revolver a Well, I kept this one just in case at home, well when we were already getting ready to leave she advised him to take the monastery with with her and put it in her bag what’s so strange here? Nothing your maid was a brave woman managed to shoot their attacker at her the criminal and did not put down the shot there is no I didn’t hear the shot, you see every night she took him down very much I’m fast asleep, come in madam and lucy his letter to you from Baroness von Berg as I will for memory pass on you are equal to self-change today In the evening I definitely visit my friends tell me can I bury the eye here in Zatonsky Personally, I don’t see any obstacles to this but you must understand that the body will be be kept in our morgue The local hospital has a long history of completion investigations and you Irina Alekseevna and I I would ask you to stay for a while in the city of course I moved to a hotel you will always find me there again a question on the wall in the cell was found drawing head you don’t know from what the head could draw her in front of she is not even really literate in death I couldn’t write my name why a rooster’s head Well, I see that you have achieved something. a lot, although there is no limit to perfection I am truly proud of Zatonsky branch of the imperial humane society of life gramercy duv indeco I dare not anymore detain Maxim Finns stay late my dear it was she who didn’t come I don’t even know, maybe I was late again hospitals but now she’s probably already Natalie’s at home, maybe mom, come to do us the honor I would be happy to be amal got soaked, couldn’t carry it away, not very good important meeting before dear monk please they will pass you on kiss my love with this chauffeur peterson come pick me up A yes driver you still don’t sleep souls with this something you look pale from more put became it’s always uneasy when you’re in this hospital coward only contagious you want talk to me about something, but anyway you don’t care where you are and where she is us father I you wonderful news filter after all, you have already announced your decision who’s here you will let them get stuck I’m in let’s go General and his elise I wrote that you need to go through yours madam Actually, I’ve been waiting for you for a long time please forgive me our meeting must was held in the morning but a tragic event will eat your miners poor woman, but I understand all the versions new your letter touched me so deeply me that I decided to stay in the city just for the sake of meeting you I humbly thank you then let’s not waste time of this kind as you may know can only be resolved in person participation of the sovereign I will help you compose correctly please believe me with atrazin tahtu when are you going to arrive Saint Petersburg Thank you Natalia floor but the thing is that soon I’m going abroad every year food my plans and intentions have changed Same they are standing here and we discussed it and she I decided to leave once or everyone has already forgotten them passions have subsided then you could go back to paris and finish your education what do you say Aren’t you happy? I’m glad yes I am I am about cities according to them it’s the same the best dog can be up to poland then It’s always good, thank God for that case I’ll arrange for the money and through you can have them in a few days, thank you, otherwise without somehow became legs nearby waited for this meeting I’ll crush it so now you won’t find anything that’s hot until no one judges us hand replacements avant-garde Goodbye what’s the reason it’s cold I’m so cold chat restored death is inevitable you are early hamster noble lady friend empresses find the killer do eat and I will make every effort not to they are shouting Kira is characterized by a policeman who heard one interesting in size A Natalia is full, how do you know? city ​​chatter hello one game on It’s a pity that we meet at such a time sad circumstances hello Mr. School You Electrum the matter is here Well, what about the doctor in Belarus personally? there is nothing special to please you with, a big wound on extensive blood loss in the neck I’m glad I took it on, I suffered for a long time I haven’t found the murder weapon yet will of careful examination I’ll probably say something else, I supposedly let me remove it take it What is this rooster head again They are already trying to convince us that the hole is ours drew her before she died do you think that it was the criminal who did it, of course you you don’t consider honor dying baroness I was drawing, but what happens? that one killer impersonates someone else strange things very strange never search crime weapon in room not found the door is locked from the inside again new in this In this case it was much more difficult to do this I can’t imagine how in the body at the head of the mind the criminal does it Well tell us how you are I met General Eliseeva I received a letter from him and she reported the same that she knew my relatives or something like that and I heard that you I’m an orphan and they don’t ask why it matters to me For the first time in my life someone took part in me example you were in a love affair with I’ll get a massage from him and all this is gossip carbolic gauze blood how do you do it explain anton andreevich what is this what is this what is abroad I don’t know take off your shirt why don’t you have the right to develop it Mr. Apraksin, you are under arrest. suspected of murdering Aglaya Stepanova and Baroness von Berg plot of his but tell me my dear what did you see mean how the meeting ended the baroness stayed at her place and then went to her some lady arrived what kind of house can you describe how no they are under the veil was there for about 20 minutes and then they went away what time was it so tulle net or so I am in the morning as usual the floor went up I look and the door is locked from the inside, the driver I think that’s why I called the police out of harm’s way further away Why didn’t you worry at night, you fool? the baroness does not come out fell asleep your the nobility of life so firmly dessole as if someone cast a spell on me look out for Yakubovich Anna Viktorovna didn’t see there went the beast probably drank himself dry, not a drop went into his mouth took inside the Moscow Ring Road or mouth is not idle we I overslept you Well, why did you ask for a loan, are you going to? waste my time experience my patience to remain silent I demand a lawyer yes that you are going to do something bad you’re naked as a falcon, you’re up to your ears in debts Irina Alekseevna pay her why? pay for you with what as far as i know she rejected you in the house a week ago and now when will I find out that you killed I certainly didn’t kill the maid and Aglaya and in what did they find monastic in you? clothing why the hostess confirms that You for the second night in a row you come in the morning devil fresh bullet wound Better confess yourself, Apraksin I ask you to admit at least who helped you remove the bullet you admit who didn’t kill who didn’t kill who are you talking about what’s wrong with you? No I knew gave that you are alive this was calculated by me and did not receive letters from I never reached out to him in that way my powers were credited you will never go I know what happened for some reason she didn’t let me know and could do it and red 25 years old so the opportunity arose and I did everything at once I found out that at that time we were in Paris and I thought that you were happy and maybe favorite and less often I studied medicine I needed to find new meaning when I I lost you and my gift but now I am me guessed about Chersky went after you again to see them means something, it’s important believe me, they don’t believe, that’s not important who brought you into the house of the spirit of women with with a slit throat she said peddler and now Ivan Apraksin is interrogating, but not his friend not earlier and a lover of stewed a.f. think oklo you were talking about him who is yours establishment we feed cattle how often can here and there would be a party on Sundays so yesterday ivan apraksin was there too came how long rights on the 2nd went jumped I sympathize and who will you be with him police confirm 4 I tried to stick my finger in here and that’s all that’s exactly your gift said quite von berg from and forest and you and What is this so that means you caught him well thank god now we will have time to bury online i mind I don’t understand why recover wished for death your maid has never eaten it I liked her and tried to get me warn I was blind to know he is sitting in the cell he just begs to meet you No, I don’t want to see him, I don’t want him never to see again he was wasting everything money that was given a week ago it was created that the blog should I refused pay when he got angry threaten me and only after Aglaya came and pointed at him the revolver went out of business and I don’t understand you in something to suspect family no no what are you no way I thank you for I have time for it, it’s time for me oh yeah yesterday late evening you accidentally have not been to Baroness von Berg yes I have been I have some relation where after we believe that she was killed after your departure it’s the same apraxin no notifications the jewelry was missing from its place but here it is the letter that you wrote she disappeared bradisa returned to me at my own request I hope I burned it in front of you and what was in it tell me it’s not yours anymore case Mr. Korobeynikov, I beg your pardon parts of me I have no idea It turns out that Apraksina has an alibi last night but no one can confirm comes out that morning I’m for you now we know for sure that he is not Aramis killed although he was guilty of the first murder what if the general’s wife herself is involved eliseeva how did she leave at 11 also confirms she could come back go through the back door it seems to me that would develop and would not return both letters and that’s why the general came that evening take it in this letter secret me earlier still in the city tomorrow Aglaya is being buried and if we have a suspicion we should to get evidence before she leaves you need to go they looked at the estate secret secret secret such she realized maybe we can find some documents but if we are lucky a person in this case, you need to leave the letters immediately the path is not short yak Platonovich gentlemen, I’m coming with us, she’s Victor You can’t imagine how happy I am about this all ends good old times duty Prepare the carriage, you are the doctor Nilson won’t give us a dressing down for that so that two of you would be stolen from him terminus give me half an hour with him I’ll agree One day Natalia Polna saved me I can’t let her killer I’m still on the weak side, hurry up, my dear. yax fruity strangest early which I had to or throughout your entire practice you understand and it is clear that the blow was delivered very large force but the warriors did not gain but it’s something very similar to a stake Doctor, go on, you said wooden. the stake is definitely not wooden non-metallic it is not difficult to say yet what material was it made of tomorrow the body will be taken to Petersburg I suppose you want to say goodbye I won’t bother you doctor if you ask you could say that yes night I was on duty at the hospital Let’s yes, a private house search is good I allow it without attracting attention but solely due to the importance of the matter I expect in essence you know I all the time I’m thinking about this matter, well, let’s go let’s think about some monster killed the ram with his legs, what is this whole circus about closed door from the inside with this picture rooster blood well, in order to blame apraksin I admit it doesn’t give me peace either especially the guard who fell asleep as if by accident your team has no hypothesis Well, go ahead and leave the city. unnoticed that no one saw you spirit of Baroness von Berg and the whole world spirit Baroness von Berg me hotel semi I ask you speak out when did it come who killed you where was a real angel for everyone Mrs. von Berg, the poor, became an angel for all choose sinners Russia for God’s sake maha what sinners what a tax collector and you will buy this already the first option a seems much better to me more sublime you’re leaving again, I’ll go to the bank I will arrange for monthly payments for ours we are leaving for Paris see you in the evening my friend the navigator is waiting for us at the exit from the city you came to the station together did you talk to him? did you really talk to him? forgiven search why do you think Anton Andreevich, I’ll go there myself I’ll talk to the devil while I’m killing Natalia Polunina or another here here dear to me before the clerk of Zatonsky so only at home cook the military personnel returned the tower to their old ones expected you are mistaken, I am not your lady, forgive me Ladies, I have weak eyes, forgive me We have orders from the police look there with the muscle police irina Alekseevna what am I no don’t worry Your Irina Alekseevna is alive and well will be back soon let me in please show me what such and such police in the evening and I’m all alone in the house, nothing to do worry simple check we something happened, maybe something did happen such happiness in the steppes of Matveyev our clerk hasn’t said anything about this yet I can say please make some tea I listen to the courts which speech find the maid’s room she herself Viktorovny let’s see Bekov’s fault Plato let me remind you that I’m now simply in charge of the investigation forgot myself what will be the orders, very simple look for the maid’s rooms and we’ll do it ourselves amber we are exploring the office please maids’ rooms are usually located in on the first floor and try not to make noise nothing suspicious mortgages are no personal letters passports in the name of Eliseeva Irina Alekseevna and Stepan Petrovich Matveeva I’ll show the clerk leaves that she assembled with quality for abroad brought wonderful and how cute are you you manage all this and cook when you can hardly see anything, is it difficult for you? ball and from all life and the stove stood I don’t recognize all the products, thanks to Irina Alekseevna that you didn’t kick me out when my eyes grew weak then they started preparing a shower good like this doctor three ports I will never go to those doctors he could have had such horrors with Stepa these doctors said there is no urine tell me Aglaya and Stepan got along well, ink and go you are young, well, go ahead this is the story of victor on maid he’s messing around with the clerk and the hostess is going abroad with him and when it no longer appears earlier new object of passion young apraksin then the maid instead for some reason the hostess is in a happy mood countries are really against him Women are very difficult to understand Anna Viktorovna she is vikram V Baby Ivan Apraksin and it’s about a Finn found avoided judging by these documents and his fox sent money monthly with apraksin will everything came back to her I am returning everything that is mine his movable and immovable property narco chopra xenu born january 3 1800 composition about the conclusion I studied biographies not before and the general was at war for a year or more in Turkish it turns out that and curses they lovers whether gray and her son not a marriageable son Now it’s clear why she didn’t immediately pointed at him didn’t want to believe 4 son murderer You know what I think, General’s wife had to sheep feinberg to find out about the possibility of recognizing a child officially natalie full often provided help in such matters of course she I told you as a woman and as a mother I don’t I dare to refuse, but why does she need this? recognition if if she already bequeathed all to her son after death so that she the son belonged to the nobility the baroness clearly kept this secret and Apraksin didn’t know anything about this Aglaya I knew why you think that she brought me here led him to knew the hiding place but who was it killed and the baroness who was afraid that the secret it will open, let’s assume that it is the clerk Aglaya could have blabbed him the secrets earlier on 3 could kill her baroness and then put all the blame on professional and after that calmly console irina alekseevna somewhere on french riviera we need to find out urgently when in for thin this Matveyev was driving and their fleet started looking for him our maid to the book is correct food is your thing anna Viktorovna self-study french all books with notes in the margins it’s strange isn’t it I said earlier that I was globalizing illiterately It’s not clear why she hid it so what else is strange about this gentlemen There is not a single portrait in the house Certainly when will your boss come I can’t know and who knows you would after lunch if they came in then they will definitely be there no I I’ll wait for this gentleman, I didn’t demand it has the right to keep an innocent person in the company man and who are you I arrested innocent madam ivanov roxy i’m afraid you’re wrong madam Apraksin committed a serious crime could he do something for you why because on the night of the murder he was shooting with water or with my husband and was injured shoulders and that the husband can confirm this husband no I brought seconds with me and they are ready to testify under oath well Well, let’s go to my office instead of all the storm to the lord go through expand the dust whether I to the fleet they gave you a note, thank you break out without knocking me here see what patient sorry doctor this is an extremely important matter Doctor, you said that Baroness von Berg was killed with a sharp cone-shaped knife subject but you couldn’t understand from what material was it made of meters I am convinced she was killed and the house it was a huge icicle that’s why they didn’t find the murder weapon simply melted beat possibly but the man who made such a blow to the norn possess do not hold strength strong men I can do this in principle RF later I very much believe so, probably then he did the same thing, he put the animals under a piece got dirty when I installed the Tatra what does Anna’s country say? look who we have today Saveliy you find out she’s a liter well how come your hand doesn’t hurt mouse mullet on so clean well here more you will not invest in the monastery garden somehow you also make a living in the monastery garden then I was there last time on Saturday dawn I’ll be there today and what happened to her running out out of the window and after me I ran step by step fence and I’ll hurt myself with a nail what’s being built you didn’t say minister will you be able to find out this person antenna speech and at what where Felicia left in I say keep on his funeral service and we’ll take well what else he immediately draws on the night of the murder he fought a duel and has a wound on his shoulder followed me and not before see my dear soon follow them and listen quickly to the wal and Here you can close the front page anyway they let me go, I’m innocent, Aglaya What it’s him who’s gone crazy Aglaya the maid did not recognize the lady with you We’ll talk about who’s in the coffin later Irina Alekseevna weight on take these two lived everyone stands please raise even if he gets caught anyway it will be worse come on, get in where are we going as far as our eyes can see or you Do you think I’ll go to hard labor because of this? This baroness also knew that the general’s wife and send a letter and set up a meeting asked once for calculation early or late beyond the borders you could meet someone who long small earlier god won’t give out the pig won’t eat what is this why store sits there tied up plug stand still and don’t move listen to my voice they will come soon we have a couple minutes who are you do you still recognize me tell me how they killed your friend as soon as they closed the door outside That’s right, she told you yes then your gift has returned you killed her no one will know the clerk is dead he will hang on him I will know you will forget everything sleep and we have been for a long time she played she flew she is not a Koran where he lived and your honor found she is vicarious what is wrong with you screen ogre wake up what happened here she said that he doesn’t want to go to hard labor what a joy what a joy that you are whole forever equal matter clear your honor first he shot the lover and then myself oh yes yes on That’s why . the criminal was convinced that it is illiterate and she herself read books and cooked villainy who doesn’t go there these days the service is all mixed up swarm you look and Don’t you understand, there is a noble lady in front of you or a maid to the river spinning in times have changed it was aglaya who killed her ren we believe that alexey did it the clerk Matveyev identified him as a boy witness also wounds from a bullet in the hand in exactly like yours and the monk’s robe It was probably him who planted it Aglaya will make a drawing on the wall, I replaced it clothes in the closet with the help of women’s hairpin and lowered the latch on doors but she didn’t know that Matveyev was wounded that’s why I don’t open the revolver I noticed, but how could she not have heard? shots During the Easter service the bells rang Yes Baroness why was it necessary and why did you weave Aglaya went to kill the baroness to pick up the letter generations of russia you but i think natalie I immediately realized that she was an impostor that’s why aglai ordered matveyev to be killed or why did he do it in such a sadistic way with the help of ice and other criminals like shake the imagination of the police excitement you Mr. Apraksin as a lover fights you should know this, stop with it sir, although your mother gave you to education but before death provided your future my mother andreyk upstairs I wanted to tell you I want to play The role of the lost baroness cannot be returned criminals and paid for everything I thank you for helping them found and started to thank creatures as always, nothing would have happened without you and I’m tired I’ll go we haven’t really talked to each other many of them brought me their apologies I accepted I see that everything that we have with you connected remained in the past and is not necessary I know you are rushing this gave birth to other words from me again I you went against honor and conscience if said aslan yes indeed it took too long to arrive time I don’t care about the hood I need to be seen off A I’m good ok i’m ok on one side A the master still has coffee, although although before good morning young lady no fight in the woods Do you care, uncle, that one is in such a early I’m going to St. Petersburg and the deferred money is going to I don’t know for a long time if you would visit me capital don’t you think from the guest rooms all empty almost them and changed his mind fracture is it because of something you know, every night I dream about the same thing same dream here he is in prison and calls me for a while rumors that he was under investigation Do you know anything about this, I don’t? In general, all this is just rumors nothing confirmed if something you you will definitely find out on the same day you will tell me swear I swear give you a ride to the hospital but I don’t dare to accept such a proposal refuse who is this here someone we just need to notify Korobeynikov marry dear and obviously close distances but he definitely doesn’t have a parade, I suppose came instantly judging by the traces The victim was killed in the alley and then dragged away. the enemy is by the way a camp and after all there in I can stay in the lowland body for a long time unnoticed oh my god high where are the good ones my respects and then I wish you health Anna Viktorovna said to discover yes that’s true and I already asked her gentlemen I am with With your permission I will go for the orderlies The identity of the murdered woman has been established, but there is no location yet found a body Not far from Myron’s house there are new and to another Razumovsky exactly as . This already nobody beak bought a house a couple of months ago back who is a landowner without any special occupation quite rich recently returned from I haven’t met him yet on the city’s borders probably doing some landscaping curiously expensive thing would not become robbery we found something else this photo night she had I had this in my pocket I’m waiting at ten yours until the grave looks like it was going to dates path where it was murder committed goes to the house from they have a brownie son there, a rascal and a gambler And weak to the female sex but only if she didn’t serve Miron no no didn’t serve so most likely he served the master klyueva or about brownies I’ll go beak you take care of the brownies and don’t please don’t worry, I’ll find something to do to do but after all someone is with you I should do it if you don’t mind see you at the police station Sorry to interrupt your breakfast Lord of Blood but the matter is urgent police Yes, they reported to me where she left for and why . poor investigator tell me who else Besides you, there are also crushers living in this house maid lucky I can do this as her maid in general and Elisha, first of all, please explain to me there was a murder here please invite your maid here immediately otherwise I will call I’ll send a police squad and order a search of the house everyday not at home she should have serve me breakfast somewhere disappeared tell me is this familiar to you thing for this and her pendant the keys of our anfisu you shot last night in the park not far from here you said her name was Anfisa Anfisa dinner body is in the morgue You still need to be in the hospital to come there for knowledge yes of course where they remember her and I need to search, please I wonder where the maid got this from expensive jewelry and I also asked her question She replied that Clooney and the suitor gave it to her merchant’s son I didn’t specify which merchant, no, I didn’t go into it in detail You yourself didn’t come from these places from abroad decided to settle here why zadonsk glorious town anfisa I hired her right away for hair care I arrived two months ago she came from village father died mother is alive well what letter and pendant to her winter and about you I’ll ask you to wipe the room and not anyone Don’t let anyone in here without my permission you still have a question, the girls say there was very pretty yes handsome I can foresee the next question I didn’t have an affair with him, why? what a strange question sir what a very reasonable question, do you live alone? as i see the maid is not beautiful When I’m married I don’t have the habit of having sex dalliances with maids known to you the fate of the previous the owner of the house raivis but he was killed a this is relevant I guess not, I investigated what I do about it murder, that’s how it is, well, there are more questions no all good what hurts so much it shoots we are still only night I didn’t sleep, maybe the car is burying me you have a nice inflammation and you caught a cold probably, and so I’ll treat you with myself too I’ll give you some medicine and you’ll wash it at home Understood husband 11 sister and husband would poison herself holy water go deaf you want all the disease of sins from corruption and evil eye of a written contract A what’s wrong with you killed innocently who should I judge innocent help me it’s not long let’s go to the couch drunk since last night talk to him now firm that samson but there is more sense in a writer Your son wrote this note, let me I’ll take a look yes it is his hand as you can see here invitation to a date how let’s see who it can be addressed to for what? Volodya is not married and has hobbies excuse me, can I have some water and of course some cars scriptwriter revolver no optimus firmware there was a path to your house body of young woman found murdered shot from a revolver where your son was last night like where in the tavern when did you leave when did you return left at 10 returned by morning clear I hope by evening he will sleep it off, thank you, I’m not saying goodbye Anfisa Luzhina was killed and served as a maid in in the house of Mr. Klyuev he recognized her things and house keys Today he will come to the hospital for examination inflate, there can be no mistakes klyuev klyuev is what I bought at home where xii Razumovsky on it I told him that this house is cursed and that father is nothing didn’t say where the maid got it from expensive pendant says that some merchant gave in the room van fiz found letters of love signed by a certain mazi to us this is a baker and bodily younger or older and so that houses hammer to drunkenness yesterday Mom can’t pronounce it but sand note in his hand parents confirmed, well, here’s the real deal she opened up and began to walk towards him and he her motive is drunk and bad, that’s the motive I wouldn’t rush to conclusions Nikolai connection needs to be checked mazina Anton Andreevich, you take it upon yourself it’s hard to go to him otherwise after when we will be performed by Yakov Platonovich However, I ask you not to forget that now the head of the detective department I am well, I always remember and hope for comprehensive assistance from Andrey in parts gentlemen and have mercy Anton Andreevich, no one has a place with you takes away thank you humbly Anna Viktorovna came for knowledge on the screen and the doctor there are people gathered what a people ah that’s what to hide and necessary to find additional evidence that will help you find the criminal well plus the vector to see it order the doctor introduce me your assistant Andrey Petrovich cool please love and favor Anna Viktorovna Mironova Mironova so I must be your neighbor I’ve been with you for a long time I had to pay you a visit so that we still have things to do before we clap We are glad to see you at any time thank you so you are a sister of mercy well what is Anna Viktorovna my irreplaceable assistant will be rolled up right hand by the way medicine studied in paris with seal I admit it’s very rare to meet young amazing woman in russian provinces he really wanted this to change I would like to continue our conversation Do you mind if I walk you there? I have unfinished business at the hospital sorry this will take time i will let’s go good afternoon served what would you like day Kind forensic investigator navigators to you This decoration looks familiar let’s put what does it mean let’s put is familiar or no put a sign listen to her Fedor acquired the fool do you know where you can find a restaurant like this on the corner dogs on the main street and the son to the father helps in the restaurant and thanks so you study paris i also study a lot time spent abroad don’t be bored Zatonsky it’s not that important if people have children they need help they want protection and then you know our life is Zatonsky Only from the outside do I seem calm I think your maids are scary steel drunk girl yesterday i was Full of life today lies already lifeless on the prosector sculptor but not there was a brand new pair of shoes from one a coin fell out of a boot, so it’s mine Anfisa was getting ready to get married why this mother well because puts a coin under his heel so that his family’s life was rich and the new one is better the bride buys so usually well of course of course you are right and Her dress was light, but it was still the body itself has not arrived Andrey Petrovich I’m sorry I have to leave you now. Well. I wrote to Anfisa so what if I write what it means to many I love this business, what business, well, letters write about feelings where were you yesterday between 9 and 11 at the bakery I put the morning dart in 2 of ours the bakers were with me you can go to them ask so it’s clear that you write to different girls, right? He who follows his passions will perish that the bones will break that’s what the electron is and stick in bun kindly be so kind that it happened that night he wrote about the wife was collecting competencies from someone there was a light dress, a new pair of boots and She put the coin under her heel and the wealth of cubatan that thank ana victor no no no how did you manage to do it all here you know, Antonovich was just sorting things out their morgue or did she appear to you was afraid that he would judge an innocent person I ate enough for a liter, please, if you can You will definitely find out something else from me let me know reported but he told them for three parts of life delicious colors certainly good afternoon wish this have lunch wish I had a talk with Mr. Golubtsov Very and now you are not with the elder please wait Mr. Golubtsov we give them storms judicial investigator Well, I don’t remember you recently. assumed duties OK, so what brought you to the restaurant? sit down the murdered Anfisa was already on your son I would like to talk to her about the relationship Luzhina never heard served and maids in espada sticking my son not runs around the maids minute on the body killed I found a piece of jewelry and bought it from a jeweler told her he won’t ask her, he’s not worth it and he gave her a little gold so that it’s not hard to say what the order says Not a single man could calmly treat me she passed by as if she was struck and where was your son last night? I know, but now he is not here, he has left for the village with provisions yes, don’t think that he killed him and soft Fedka is not like that, why does he need it tell your son what he needs show up at the police station and give indications as soon as mts near the city anfisa and dinner and consisted of an appeal in relations to any All my life I’ve needed more than just money this says to sing candy fools and loved ouzo sniffed services I’ll start what for I would love you, here’s the note you wrote note yes I thought agreed it gets worse at ten o’clock in the evening I’m now waited and then went to the grief tavern he was scared to wash down his food, she secretly wanted to get married, bite, I don’t know everything the question was said, I swore to remain silent the dump will be eaten and you will oppress but it is not yours don’t meddle in the matter, there was a revolver lowered back lost in the tavern fools how everything is so neat and you have a revolver lost to a rival from the city and went nowhere We will check everything carefully before leaving country I couldn’t eat it the streams I couldn’t understand this procedural violation nikolai vasin was give body without opening it up here is such a thing their Platon well a whole crowd gathered, almost a riot the priest came and asked the mother, this was crying but you understand that now we are not we will be able to determine what kind of weapons did they shoot from? have mercy I am Plato what should I do here simple no lover so another Nikolay sat down Yakov Platonovich as the local police chief the management gave the order to avoid popular unrest you this share drift why didn’t you resist you are the head of the detective department Yakov Platonovich Platonov why are you taking on this trouble? some inspector auditor Yes, you dictate your will to us and I will allow it remind yourself that the police are obliged take into account the local realities that you probably forgotten during our time mysterious absence of the Lord pure Yes, you’re a weakling, I knew you could do that. I ask for forgiveness colossi not me you tell what He who knows how to control his anger will certainly he will live to old age but you see for yourself the situation is out of the ordinary I don’t understand where he is there were all these loops and why did you come back and fix everything in the same way abilities connections you know in his character yes but he thinks that there is someone here he’s hiding something here secret secret and what secret let me know I believe that he was sent to Zadonsk from some kind of secret mission and what kind of secret missions may be in our town what images do you remember which were woven intrigue five years ago that’s exactly it, i’m sure that yakov platon already It is not by chance that 2 is given here that style is it really didn’t work out very well fleet of rights my dear I ask you how as quickly as possible investigate this case who rus efforts i I rely on you these why did they come to the work of their hands look and shut up my mouth no shut up look at him look here he is the killers came to have fun, what envied he ambushed and killed our happiness you killed changed his mind, the little one got scared and that’s it police arrested a man for fighting with you brought it to me even though my little fingers and I don’t I know, oh yeah, fear God, Euphrosyne, why? your daughter was better than others for not the same and there were some sins, yes, if I I did something so wrong with my pisco I really didn’t give them the right answer before they lived says to accept the cliffs of heartless 1 manage no, then listen, he will sign this one ryabushinsky did not have time ordinary people recover from the murder of their general elisha you baroness von berg so new scary death shocked everyone anfisa was shot puddle to share dubious reputation and mysterious to occupy sinister ones again fell on the launch of the ominous shadow here about you are there Are these streams of misfortune connected with the fact that our launch returned mountain sorceress anna mironova and from what no I will definitely answer him there is a gentleman in our column he is still they will dance all this came from a letter from a neighbor Klyuev and I of course responded to his invitation for dinner tomorrow what a nice young man we have today met him I’m very glad that something new is starting acquaintance you need to be in society more have fun she where are you looking I’m tired and beaming I’ll go don’t go away, I need you, I said leave and afanasia klochkova’s shops wanted bases afanasia’s shops galochka in something someone asked and me no and how are you feeling mom ok why are you asking yet good night good night okay up to her old tricks again ran through the forest with the police your maya was against it but I don’t think it’s possible to interfere in cherri bat ours this is for you she and Anna Viktorovna will be found possible hate gram or you have long I was forgotten in that case I am with I will humbly accept the poison and never again I won’t disturb you I acted dishonestly, one thing was put into that night and at least there were reasons for that from me beyond my control I know that I cannot be forgiven hang up with all these five years there was no day not a second when trends thought in asv I didn’t dream of it, she’s the same meeting A A It was you who was detained at the cemetery last night Vladimir Gamov good trental speech to I and don’t you think that this is somehow on what basis is the basis greater than Mr. de Armas caught enough possibilities motive for murder all folded according to him and he has a revolver I had this I read in your report he lost the revolver about the figure of people not destroy for what he was not guilty he is now we let’s deal with the revolver, it’s hot your son also had the opportunity to motivate murders what was his motive jealousy raffia was going to marry someone else, that’s also from your report well what do you think of the government in your power to ease the fate of your sons let’s figure out how to break away from revolver is it true that vladimir at home left a revolver in your lord fools of institutions really that’s how it was so the revolver could use oh no I couldn’t I returned his windshield wipers are springs just right murder, that is, the revolver was with you your son night of murder No, I had a revolver, why did you? lied Sorry, I didn’t mean to scold you helped me with this murder so you had a revolver then I’m asking you, did you kill Anfisa for that? to prevent her marriage to yours son, God be with you, I am not a murderer I was at home with my wife all evening and all night the servants will confirm very well gentlemen but this is not enough tell me what time you handed it over revolver proof at ten o’clock Vladimir was at home and I saw him briefly so he could see how the master Golubtsov passed you on to rival no no we saw it little by little we talked in the hallway and then I revolver cleared the table parents always they think that children don’t hear them then heat your son had the opportunity to take revolver and try to return it to place well mine it’s not your fault put it down here his but unfortunately I can’t tell you where you kept the revolver at home in the restaurant too according to doctor mints it is murder happened between 9 and 11 o’clock, then your son also had the opportunity to take a revolver and I’m very sorry to put it back in place gentlemen, your sons will remain under guards about other suspects don’t want to check you mean yourself yes you also had the opportunity matiz you killed anfisa and later handed her over revolver for the gentleman and at home for what to divert suspicion from myself I did not kill I swear it’s some kind of weakness photo he could shreds athanasius law school what kind of meadowsweet your ignition we from some seeds through They gave me money a month ago, that’s what I needed Well, in order to name his daughter, he married her off and our blockhead seems to have a fever there were magicians who could express their paws and if Borges was straight up theirs then I but also calm teeth that’s why our sons they were shouting yesterday at the cemetery that mother Anfisa and him yes that’s how it is I tried to reason with my mother but she wouldn’t what kind of meadowsweet this he she was resisting bewitched him and he already I started drinking and abandoned my body and realized I went he directly found the Slobodian base I have to ask you to leave us, gentlemen. it’s in your best interest the sooner we do it we’ll find the killer the sooner your sons there will be freedom and a master will be given bring and revolver accomplice rehau with them for the sake of the police chief not left me no choice you make my soul burn here 9 anyone who’s here that’s what I wanted to do here before vectors I would like to ask the same thing hair not here brought two offices to my wife, we don’t know yet why does afanasy klochkov live here and the failed groom and his mother told me someone was shaking it was overpriced in this I don’t really know, I came questioningly if you want to eat something there, that’s definitely not it Afanasy It looks like this meadowsweet really has it a black streak in life him Elena Viktorovna It seems he won’t harm anyone anymore Kvachkov has been dead for several days so he couldn’t kill anfisa, you’ll go, I’ll go at the call of the police they will take the body I confess when you were scared of me it seemed that in front of me was the same forget it was a moment of weakness you became strong, I had no choice you asked for my letters, I read them and wrote them I don’t give a damn about anyone We told him that you can’t say those words that in your opinion I am waiting for you didn’t let me finish I wanted to add that I can’t yet tell you these words there are circumstances yakov platonovich I’ve already heard these words from you this is the last century you are right i was absent for a long time please answer I only have 1 question to answer and more on the farm Yes Why what did you accuse us of? You said one. question one victor na and believe me i don’t I would not have answered it to the body except you from this folder which they left me about saved not in the end of course I will return it to you I beg you not avoid I must see you watch your bottomless eyes g-lorry. what let’s talk about business if you want the landowner’s beaks went and talked with I met them yesterday but you are right we need to talk to them again, let’s let’s go together well about the Russians the first time we came together sold here not for Razumovsky and you also stole cedar from his table and we managed to find out who killed him let’s talk about this later How long has Mr. Krai been having problems? shower with a month of faces he gave birth much earlier as soon as we arrived I was very pleased with her services pleased often praised her They gave me gifts as an example present new clothes all sorts of hats dress with bleaching these new outfits she has the city is glad to see you gentlemen on victor na yakov platonovich today your reception is strikingly different from yesterday’s please forgive me, you caught me I couldn’t even imagine it being taken by surprise importance of your visits please unban that I made inquiries and heard a lot wonderful stories so what I was looking forward to our new articles Well, let’s forget the old ones analysis irna happy to see you in my At home your mother invited me to dinner new ones beat me to the answers to this does not cancel when tire maritima farms without 13 years old we come to you on business I’m listening, how can I serve you know, I’m leading investigating the murder of your maid I can inquire such outfits trust milk and stirred it up when he had time protection from the wire but I already have it hides it just didn’t seem important I bought her some new ones before what are you in do you find something reprehensible in this? I am of the opinion that nothing makes a girl as happy as a new dress what hat anfis was very I was resourceful and decided to thank but I didn’t see any new outfits do you see what the problem is with her sometimes her mother came if she saw these things in her wardrobe that in relation to me her daughter would have turned out wrong and that’s why anfisa kept his things in another place closet She complained to you about her mother maybe to be something forced her to do something or I didn’t give free rein to it, it seems to me that they had complicated relationship but to something forced forgive me for my next question but where were you on the night of the murder from 9 to 11 manat hours a natural question with 6 From 10:00 p.m. until midnight I played cards in the noble assembly A dozen or so people can confirm this I can name some of the saints no need I thank you for the water and let me I would be very embarrassed to ask you a question I want to know your secrets, is it true? You and Anna Viktorovna revealed a lot of crimes and what’s not in it the last role was played by yours extraordinary gift it’s true but only partly rumors about my abilities are extremely exaggerated and now i’m consulting whom platon draw for medical matters only tell me anfisa didn’t tell you about their gentlemen on not command mom not I never have cabbage rolls, I think that he, like everyone else, had his own and you have one too please carefully I have the first guests to whom I open the door its a steam engine it produces electricity I’m going officers not not only your house but also utility rooms then the English apparatus also came to the peasants’ houses the system does not have this, this is yesterday’s Parsons turbine day I’m going to implement my estate the most advanced technologies to build a school for peasant children are here specifically productive for sowing and there is chemical laboratory if you want you can see the dps nice to meet you although this is not such an unpleasant reason I am sure you will find the decree Hello, good health Vasilisa Kapiton on you will be yes and you who will you be, you are a doctor, right, yes, to me you said for the new merchant of beaks erase mistake it must be maids and they knew Anfisa oh I knew forgive me Lord all her sins what sins what voice did he have stupid what does it mean looked there and where you can’t look, what’s hidden is hidden I don’t quite understand the basilisk tons what are you getting at, killed her dude or something tell I lived in Europe for quite a long time I studied chemistry and mechanics and I can say maybe a seditious thought for an educated person man of europe is boring boring Agnes according to your weight it was not fun drive janeiro cape town and how not it’s strange to rub in now that that 2 villages who has access as far as I know foreigners are banned from going there under threat death how did you get there but it I’ll tell you a separate story some other time put it and saw a lot of interesting things but what I heard you Anna Viktorovna it’s all cancelled there are miracles exotic countries andrey petrovich I told you it was very exaggerated yes, it’s all in the past, well, as a gentleman Ryabushinskikh wrote this in his article libel committed she assures you tomorrow in our magazine for ladies my answer to this scribbler will come out write to you too, I will definitely read it 6 a woman’s view of the world and this is what we need everyone still misses it, tell me more about your travels let them a funny thing happened to me in Congo this is very interesting how angry petrovich is educated smart very pleasant in communication with wealthy people Mom, it’s been a long time since I heard these there was no one to treat you, so I said, here I am I ask you I smoked nothing it’s boring Miss, who has come to see you, Anton Andreevich? oh my god, tell him as much as possible that she went to bed i no no no no he would didn’t just come like that, is it important, well how do you know anton andreevich she is victor you forgive me generously change what happened come in no no I’d like to say a few words the thing is that i was talking to today Anfisa’s fellow villagers and many hinted for some strange activities Nobody says anything directly but I I feel like people are afraid of something like this yes and that’s why I decided to ask you maybe be with her herself which I understood I I’ll try, thank you I gave the money on your own let the pampering force it stolen 2 and I wanted to throw it away but my mother wouldn’t let me because of money everyone has like henri on mother told fortunes on cards for money forced how come you got it so soon from the general tip erase just what I did to you thank you from the bottom of my heart good night to you Anton Andreevich helped me a lot and that unfortunate woman in the store got drunk death and the former goll poured as It’s strange who then that nothing good stretched on a third by you night I need to talk to you it certainly concerns you now I’ll show up but I know too little about HIV to form my own opinion about him and for me he seemed very nice and besides I she noticed that he was carried away by Anna Masha is located They are both grown-up modern people. They’ll figure it out themselves, of course, I just won’t I want them not to interfere either, and that’s what you think can interfere you surprise me victor that he is worthy of man she refused to go to paris and it’s not for you have to see him and talk like a man and like a father about something find out about his intentions regarding a if he has no intentions then will demand that peace comes or it becomes clear Hello you are a kickback good afternoon welcome how can i help you don’t worry i just want to take a look of course to rule and you just opened up recently a week ago kipling the jungle book but this is something I would gladly read the new product was brought in quite recently and gold I’ll take them Dr. Mills examined Adam’s revolver really came out of it Recently they shot at least I am inclined I think it’s Golubtsov Fedor who killed jealousy is quite logical why not agama why was he going to answer? if I changed my mind I would have killed this why if the girl was pregnant from It’s interesting to imagine him in what scandal suffering parents blackmail with her I didn’t understand from her mother’s side what are you getting at? Adamov suggested unit invited to date and killed this version Of course, we can’t rule out the fact that century fleet he know what i managed to do yesterday find out that no anfisa was fortune telling on cards for money predicted fate and for this many of her many people didn’t like it, they wonder I don’t see it there is nothing special about this, although you are right I need to ask my mother about this again or ask about it and think about i am doctor eva was allow by its height what are you planning I want to convince him change your wrong decision but you are not from around here, from St. Petersburg Polina is not Kyiv, actually Pelageya, but Pauline more suitable for the housewife fashionable book and I, Anna Mironova, hope that yours the bookstore is really coming soon will become fashionable thank you and you sister mercy to serve here hospital nearby and what medical do you have from you no but I can order from this it will be very useful I will please the doctor fought thank you for going again i think you you will see me here often thank you have a nice day you want to be is making I delivered it didn’t seem like it at all necessary impossible to put forward accusations unless we are sure that Mrs. needed him shot from Mr. Adamov’s revolver We can only establish this by opening it up bodies and delivery do you put me to be their platon is in an awkward position I went to light a candle for my mother and fellow villagers killed well now can you imagine what could be their reaction when all I have light, I will try to explain it to them that it is necessary but maybe we them at night loss on them group and we will return early in the morning his doctor knew how to be needed at the cemetery much more time for all of his necessary research so that We still can’t hide the factoring you cut me without a knife but in this case you should be registered find the criminal otherwise there is no excitement avoid you understand this of course Well, why did you start a stable here, it’s dying came to life from here this area what are you doing glad she’s back the investigation goes on to what extent the investigation and damned cross on you do not miss I’ll talk to her, stop and think kitchen how sorry i am disturb your daughter’s ashes but this it is absolutely necessary, you want it to be we will click on the site demonic deeds yours they wanted to cut first and now you take out the land, you need to push dumpling of that come with me let’s go I understand let’s go with me I’ll participate let’s talk a thousand why Mrs. Mironova Mr. Bread so I’m a presumptuous scribbler and collector low gossip Judas, you who do not remember your kinship, you deserve it each of these prose Hi you, yes, those who don’t remember their kinship, yes, how are you the editor missed this, especially here there is a missing comma here but this is better disgrace more timofeevna you should work for me what yes we will transfer your column zatonsky telegraph you are talented well how can you vegetate in Tomsk saints forgive me lord but i will be I will contradict you I will refute you and throw mud at me just like that this is what you need, you understand how they will take off circulations promise to think about small effects my proposal Fine I will think I hope the documents are not damp I’d rather have mold eat them You saved many and Anna Viktorovna Sorry, I can’t say more I’m so tired of your secrets what was what is what will happen and how will the heart calm down tell me about russia how do you live cow feeds his garden, his daughter helped the service was good, the master was kind paid slyly but the service lasted only two months I kept silent until then, you encourage me crimes your neighbors said that you never been poor so where does the money come from We hardly had any special money we made ends meet, but it was all in vain You are stubborn, Euphrosyne, there is one person so he says that it’s wrong Anfisa predicted his fate demands money back for fortune telling whoever is like that, let them not lie and come true and fortune telling She told Petrov that her son would be a toxin. they had a baby, well, it’s true, after that, and the girls the wall predicted great love and in she was forced into marriage and then I fell in love with him passionately and also because she predicted a long journey for the groom, so he did Well, here you go, a long road ahead ah so that’s what it means sooner or later one way or another cleverly conceived cleverly bright daughter sat down at the table and good doctor Hello, ours is here arrive Anfisa killed the servers here, he thought that rids the world of all evil but there are vampires werewolves witch you You’ve probably heard about these escapes before for murder out of jealousy or place there is no need for a silver bullet and it is possible to get around in the windows of the venerable to say such you can go to the blacksmiths or in a jewelry workshop by the way remember him asked me if there was Anfisa is pregnant for so here she is pregnant she was not thank you alexander francaise at least one motive can be attributed this is the house of the blacksmith Kukushkin what can I do for you good health sir and the same to you Kukushkin Stepan etc. Well, I’m selling the blacksmith, I didn’t smoke they dared to work the figures they say there and cousin and we washed the high frequency and I see, well, somewhere in there we show the forge necessary they uncovered the confusion, no Danis, it seems like everything is on the tool is just lying there in weight there I put him and raised the mountains of Uncas if anything I would read I haven’t been here for two weeks silver on top figure piece spoon fork and knives simple tableware I think siri guru joy of snow andrey petrovich new things why do you need it, what’s better for me give it to me I will give it to someone things of the deceased give a bidet someone sir. open up i need to talk to you this Mironov glad to see you filter you are mister navigator I can’t answer you the same way I would I would rather not meet you if don’t push Well then, should I ask you? directly what are your intentions regarding my daughters restaurant all know from deep respect floor these are all words gracious sir, do you intend to ask her? hang your hands I would consider it an honor but everything is pretty clear to me you don’t have to continue any further sir storm in that case I order you not to come near me daughter with all due respect to 3 frets you can’t order me around listen Don’t you understand that your presence poisons her life interferes with her happiness I suppose Anna Viktorovna she herself will deny me the pleasure, I see and if he deems it necessary, I will say everything and I suppose if there is even a drop left in you honor you will do as you must, I dare expect our conversation to be saved in that evening in parts this is the last one and thanks put it here baby somehow I’ll drown overlooked it’s because of you that she gave me such a gift She said all the worries are carried by modal was already made by the blacksmiths kukushkina this hid the castle I found traces silver work and a piece of cutlery device wow and the jeweler told me that the field is made like this once from silverware only necessary It’s scary to imagine searching houses the killer must have had access to 3 of you so it’s either golubtsova or adamova but why did you need to shoot? It was the silver bullet that pierced the gentlemen crayfish I thank you don address I ask for yes well what same gentlemen, some amazing somersault We owe it to fate that we have what we have In our city we see you Yakov Platonovich and you know what I feel what I feel that we are standing on the threshold of some significant and I’m not afraid of this word fateful events yes something something will definitely happen I don’t know what I hope something good like fleet night your health your health we beat him. thanks anton drake can explain and what kind of event do you foresee? yeah how should I know get away from justice yeah God willing, justice will prevail It will be good after all, I’m the boiler. Tell me, what are the prospects? you see yourself here in our city before the prospect of me is always one to serve this I understand that service is service, but maybe you will want to start a family and settle down so to speak, settle down I doubt I’ll be able to combine it service time he got married and in any case until now it didn’t work out well, I also understand patricia let me put the heating pad here, really then fools It only remains to find out whether it is the father or not and let me ask where they removed it these devices they are so good, such Zatonsky no more, personally ordered in St. Petersburg you won’t say right away They believed that Anfisa bewitched men perhaps they thought she had cast a spell your son literally has nothing they already took me, they mentioned me at first our meeting you will find out anfisa was killed by silver bullets cast from your restaurant’s fork Well, what can I order by the grace of the Lord? and anyone could steal from us 1 lit always doesn’t disappear after the banquet It’s good that you can still order new hives athletic time needs time you have you yourself showed that sir Adamov made a revolver for you restaurant a week ago and they returned the hive only 3 days are not enough maybe some of the nude’s other children as far as I can tell no, only Soloukhin from the mouths of geese misfortune is exactly where is anton andreevich so the power of cabbage rolls in the restaurant dinner from I didn’t know such people that he was lying on now the waiter found the boat and then I forgot where the waiter is now to bring here the glory of attention and for where for which he asked to go home he just got sick and feels bad talk show words gentlemen what’s going on, we’ve been extinguished I urgently needed to go to this how are the potatoes and shook be but Is it really impossible to figure out where tomorrow where is the takeoff already, let’s have a drink police open police Anna Viktorovna how do you post from me asking what’s wrong with him maybe send for a doctor to the persons peter soloukhin it is you who will convince faisal dinner confess six months ago my wife the confession went, we lived in poverty there was never enough money but I went to find out what’s ahead office and promised that everything would work out she said all your worries will be washed away by water A month later Alyosha drowned and then the wife died I couldn’t bear the grief in your opinion it is ansys’ fault and it was she who predicted it so you decided rid the city of witches i read mystical book that the witch only knows silver that wait for the right opportunity and when Adam’s son put his revolver in restaurants left who did not come my time passed abandoned bitten and how did you know that it was that evening Anfisa will be in the park Fedor Golubtsov let it slip and he Vladimir boasted at home, they say you are crowned with English opposite parental will fistula and crowley when she sees and then they shoot her and the revolver was returned to Golubtsov cast suspicion on him why else to take one sin on one’s soul I wanted to show him today where my conscience tormented me in thought and in the end you will not find many in the city has a death wish in vain red Venus Anfisa death of your son and and fortune telling was a game 3 times more no one will be harmed by Alyosha blog i’m coming how stupid this all is Anfisa told you a ridiculous story no son the drowned boy is with you everything is fine now it will pass for a long time that’s how they coughed when they went to their doctor you worry about me that’s not all lost anna viktorovna I see you are still here, allow me to Of course I hope we’ll go to those cab driver goodbye the estate of the world made themselves wait for the blow to come I hope no one will raise you in the back streets saw A mo You yourself knew him, you saw him as a child I barely remember the shower a couple of times, he has a mustache were there such outstanding ones and what helped You’re joking with them, you haven’t earned a penny in 20 years gave it to him even though my mother is his own sister Grandfather was stingy, Andrich was tall, but now all this is yours and only because he died overnight and didn’t have time to do his part movable and immovable as they are almshouses to bequeath and by law I am the only one heir Well, let’s go to that Aladdin’s cave yes, of course they are not your late Aladdin more likely Miklouho-Maclay and touch the expensive thing you will break it hello grandma who are you I am Praskovya’s fox Rastan served the deceased with speeches may the kingdom of heaven be his and by any chance you won’t be the nephew nephew two or three opanas arrived and that’s it I think when the young master comes, then perhaps but come on, take off your clothes, give me your clothes I will accept listened to the abyss I am a man of new views you are not a servant to anything you can go free how is that possible I have 6 I don’t even have my own corner, I’m your uncle’s 40 years or truth and then we got into debt I feel like I owe a lot almost 20 rubles I don’t have that kind of money ok daddy stay then decide with you how I will make it eat the riddles perhaps in fact I’m hungry as hell, yes, I won’t refuse I’ll tell you straight out what the lady is talking about right now I expected more from your inheritance, you I say stop, you will leave, it was a whole the condition was guessed by his was know what you spent it on however, half-shin yes, you can sell it what the hell like iblis Now I understand where the deceased spent it do you think about money there are many sites that can help out this is enough the most daring project of you I understand what this means we now have money not a gun and there will be pressure A what would you like, madam, this media list hva du it is the nicest house and far from the city so why have you been serving here for 40 years already? served and will another place suffice for itself we don’t need it for what Dmitry Fomich heard you really don’t have and these are not against me let’s go, we think alike, we look at things alike how much does he owe you 20 rubles here take track 1 Mitya fire boys i’m here Andrey Petrovich plus what about this in such and such call early good morning anri petrovich starve him wife Anna Viktorovna hello spend francs everyone obliges I was driving by and I thought, yes, I’ll stop by the neighbor’s I’ll visit and they did the right thing, he doesn’t have it tomorrow to thank ceed but then maybe coffee but we’ll give up the kitchen thanks perhaps we’ll turn it off and have you heard about auction what auction we don’t know anything about today In the evening a certain Dmitry Aristarkhov is selling off his late father’s collection uncles burial masks sarcophagus canopic jars channel pie is such vessels for storing entrails died in ancient Egypt sorry good it’s nothing to worry about you and they said Dmitry Aristarkhov who am I I believe this is Andreich’s nephew and Rostov the local landowner never spoke about him I haven’t heard of it in recent years, no wonder for twenty years he never left my side the old man and you were strange in general Nobody had really seen him here before more and more with you Egypt disappeared through some kind of wisdom almost immortality but you clearly don’t have immortality I found it but I collected enough collection impressive famous personalities will be at the auction Golenishchev is the most famous in Russia scientists Egyptologist owner of his own collections of Egyptian antiquities He says he wants to buy the most The most valuable lot is a mummy which is about 3000 years and what to put on public display review I don’t know, would you like to take a look? I admit, no, I don’t see anything attractive everything to stare at the buried deceased is not fat just I stopped by to invite you to this auction I apologize for Petrovich I do not I’ll go anushka but why don’t you go You’re hardly ever on the ground like that dear business somewhere really rare chance to see precious heritage of millennia agree to victor there will be very many familiar Mr. Shipbuilders will monitor the safety of all slots if you still insist then I guess I’ll agree, it won’t interfere, well come on in anushka how are you with me ok here is an example this is naked and such is your grandmother’s and doomed him this and the wedding well all this is nonsense wear you were very healthy, thank you very much Mr. Clio IV will shake mom our relationship with andrey petrovich friendly people I think he will agree but please don’t tell me this statement I told you a thousand times I didn’t I’ll get married May be . when live your life of pleasure what kind of fire is specified and also everyone marriage even if concluded for passionate love in the end licking eggs is unbearable in this descent Antonovich she wiped it here and I with It was a pleasure to chat with you execution your friend is busy this evening was born you got along with my humble company nothing against them maybe some champagne and so ladies and gentlemen alabaster fluffs from an Egyptian tomb 4th century BC eras starting price 500 rubles for large ones dessert grid 550 rubles 550 rubles 1,600 rubles 600 rubles 1 650 650 rubles 1 650 rubles 2 700 rubles 700 rubles a great investment for conjugating your capital 700 rubles 1 750 Victor she is not I expected to see you here, why not? I know I thought it wasn’t for you two glasses of Golikov listen we 700 to 800 rubles 800 rubles once I here on duty do you think it could be dangerous yes no just a precautionary measure agreed should go very valuable only you someone you are looking for and the risks of tetis someone not we don’t touch him, but you do something worried how good enough for you for 950 rubles I want a round figure of 950 rubles 3 sold uncle uncle and when returned only so one of the screams was almost late the will be amoxil I came in so that’s all the benefits of cutting it and the sands of antiquity quite a good investment while away so since when are you interested We only have 2 Egyptian values appeared this gentleman whom my Mironov already uncle very nice cliff even mutually you forgive me but without an invitation You won’t be able to get inside, I beg you Anton 3 Well, at least for five minutes 1 I can’t see it with my eye, that’s the most important thing event of the year and my readers don’t tell me forgive me if they write to me I would be glad help you but alas invitation however let me console you that scream measure three before that who is looking for that will find Come on gentlemen, our next lot wooden figurine depicting Egyptian god of death he murdered the ancient Egyptians believed that he meets the souls of the dead and leads them to the judgment of Osiris 2 centuries AD starting price three strings 350 350 rubles 350 rubles 1 350 rubles 2 fat 400 rubles 400 rubles is great avenue 450 he is here Andrey Antonovich what if you tell me everything what is happening there will be recorded of your words well Don’t you understand, well for now we’re here on our own push I myself will not see anything in the hall if something happens then I give in go there and roll your heads quickly into the hall wait a minute I’ll wait for you here, I won’t tell you anything I promise to join go precious in our and I bought it, congratulations, excellent acquisition forgive forgive for god’s sake will you allow me to look at please amazing work congratulations hide from the sun so that the colors don’t fade phenomenon sorry i didn’t introduce myself take switch ganichev Egyptologist very nice Andrey Petrovich only very nice in one roof and this must be your wife no i am not your daughter lawyers neronova 1 viktor my approach neronova isn’t it you the most medium woman who was written about newspapers a few years ago very I wouldn’t like to oversimplify it It’s a pity, you know, I’ve been doing this all my life I study ancient Egypt Egyptians in communication with spirits was nothing I didn’t think anything unusual about everyone there is a person to part of the soul or which remain after death earth and you can talk and schiz me our main one here is the mass priest of Anubis more precisely, the mummy into which he was turned the body is skillfully polished and it is bilt as it is supposed to be Kent and children of years they are typical for your fight studied banks it is necessary to note she will come out she what are you scared of today my head was spinning from the champagne that I I can do nothing for you, I’ll stay one okay I won’t leave you alone two Petrovich please I beg you everything is fine with you as you command and so ladies and gentlemen 2500 rubles 1 2500 rubles 23 thousand three thousand rubles 1 3 thousand rubles 23 503 thousand 500 rubles 1 3500 rubles 4000 5000 5000 times five thousand 25 thousand sold gentleman stripped him for 5000 rubles she is victor anna viktorovna darling please help me out but at least a couple words you were there tell him you didn’t see him in time make out chasing sensations again gentlemen ryabushinsky what are you master of the storm I I just wanted to know if I needed anything Viktorovna no no need both not victor they are there for whom take care that’s great Jacob Platon not in the same 2 Don’t tell me who bought the legs scientists collector from saint petersburg Mr. Bootleg and that’s where I’ll end our conversation for today Thank you Are you okay Anna Viktorovna No, I kept thinking about this top mass It’s terrible that his body is on display their tent falls to already expressed believed that in 1000 years he would be behind because of the board you don’t understand me in real life a person is the same as you and me his thoughts and feelings dust and bury humanly they exhibit in the museum honestly beautiful what I know you said that the past is not returned no but still what anyway a cry in the plasma and you are not a child at all if you want to say something, speak stubbornly I would like to give you everything I can suggest only Yakov Platonovich You so quickly I passed by I thought something had happened, you understand, I I am personally responsible for this the event certainly didn’t seem like it to you strange conduct of one gentleman me A let’s sum it up like this surprise yes we are here you just met at the auction look at what thing I came I didn’t I was waiting for you and if you don’t have me, then I’ll settle down hotels what nonsense what the hell you know they are always waiting for you here holes today I want to know everything We beg you for the details for God’s sake not today and I’m so tired of performing I bought this from you at an auction and it seems to me that Annette has a new one fan quieter your neighbor klyuev I speak quietly and not likes such conversations well yes we will really measure the well-groomed and I am so immeasurably pleased with how he seemed to you we didn’t have time to really talk about it my glorious what do you say did you recognize anyone it was too noisy it was impossible to listen to the voices You forbade me to enter into conversation should not take unnecessary risks if he in the city it will soon appear in the x store be careful birch weapons that’s what it is A Sorry sir, excuse me, they are easier to create yours I but yesterday we saw each other at the auction bootlegs Egyptologist what but judicial investigator listen so coincidence i like once the area was going and the thing is that sir assault that I would not like to rush I still hope that this is the case with the accusations the mistake is not an evil mind, can you explain it clearly? what’s the matter the mummy turned out to be fake good afternoon, no more words, court let’s go yesterday after the auction see quite which agitation and I couldn’t wait to touch it woven treasure New Kingdom era as a rule has amazing instability some of them even have an eye joint very curious but I ask closer where wow yes yes of course and so well I’m not in stockings I was able to resist the temptation properly consider my live i collected all you have to do is turn bing slightly to check its safety because this fabric for more than two thousand years it has survived to our days thanks to the special composition of which her about medals and noticed that bento shared too easily it was immediately aroused my suspicions without much the work was divided into the upper body and I realized what was in front of me fake and how did you do it Got it, you’ll go. I have seen dozens of Egyptian mummies and I can to believe that they don’t have teeth like that whiteness as well as nails obviously lost by the saw I hope that Mr. Aristarkhov himself did not know about one and I agree I will return without money scandal, wow I admit I also think that Aristarkhov car and he inherited the collection a little over a month ago It’s obvious that it’s his uncle’s mind that is being fooled everything needs to be implemented just intro I’m recruiting, I wouldn’t rule out forgery sides heir but she also had an ocean he was in charge of everything at the auction attorney I hope he is still in town that’s if I can do it to him with which I recently perhaps this is murder gentlemen you are not believe me, I’ll talk about this myself right away She flew very opportunely with us today a very unusual patient cats and yes judging by the condition of the teeth and I have this woman who is no more than them 25 years old she has a cut on her stomach and all the internal organs the bodies were extracted and dried in this way what can we assume is that she has been around for a long time lay under the rivers I know us the sun blown by the dry wind that it is absolutely impossible to teach our weather places or she was under the influence some chemicals really bother me a convincing fake exactly like that what did the Egyptians do with their dead the organs were removed and then the bodies were kept in sodium hydroxide for 40 days what do you mean to say that he is a criminal owns Egyptian technology and embalming somehow it is this is not a closely guarded secret process Herodotus described in detail in the 5th century BC era 40 days means she could have been killed not at all until 40 but maybe 40 years This question is impossible to answer I swear to you I didn’t know anything about the organizer auction said something provenance mom not leaves no doubt It was bought in Luxor from the department Rasul he receives his goods directly return this from the plundered tombs the amount paid is of course only you see I don’t have any money now, so what? Well, you’re telling me, Dmitry Afanasyevich. a fortune at auction yesterday helped out I understand how it looks from the outside but Believe me, I owe a lot one person well what we search the leader this is necessary I’m afraid that we are not talking about not only about forgery but also about the possible murder and so you understand 1 the suspect is you starting Frantsevich, you could at least say was there a death of this woman violent answer to this question impossible too much time has passed you she vector I’m afraid that we from you I can’t open this case, I’ll try in a few minutes to be left alone I understand gentlemen, I ask you come with me I need to clarify some details A spirit movies Why do you owe so much money? mister aristarkha skis student studies by the way, what are you studying in year 34 chemistry chemistry interesting yakov platonovich I found this bedroom whose things are these in the house they still want iron threads one who are they belong to the bright possess there in the basement that I will have the benefit of seeing it myself once died on who killed you I order you to show me show me bo I order you to show me for 3 8 liters why do you need it and you still have to go become quantity hold hands she is victor what will you please girl young and quite beautiful I killed man masks anubis blows live all I didn’t understand anything else, thank you in that case, allow me to take my leave I’ll go to the site to conduct an investigation in the usual manner and Mr. Glinishchevo no longer cares about the fate of the mummy and therefore that he urgently went to the hotel renew your number i think that worries all the best all the best there is nothing to talk about here yakov platon it’s clear collistar how some woman arrived it’s a fact you found a caustic one in his basement sodium this is also a fact and what follows from this it follows from this that I k plato that our the student killed his guest and made her mumiyo I think it’s wonderful, I would even said some political way get rid of the corpse anton andreevich the most difficult method is very senseless boots sooner or later You would have discovered the substitution yourself they said that Aristarkhov is going to escape from the city, here’s what about golenishchev he would crucify movie in his Petersburg so alice go where were you at the ends of the earth lands so i suggest we put pressure on him it’s time to ask people in the city surely one of them saw me coming lady if we establish her identity and we will understand that she has gone missing be it is in our mind It’s just too easy for you to always make everything simple it turns out that this is all you have then there are no other versions in that case I went through working on my faith for Mr. Golenishchev, I apologize for anxiety alexey ryabushinsky newspaper zatonsky We saw each other by telegraph cooling at the police station before I found out about Mr. Ryabushinsky, what can I do, yes, I am here see or dine you alone and I saw you exactly the same, so to speak his disposition will either be for you move to my table together it’s somehow more fun, you know I always dreamed of talking to someone you know about the upper ancient Egypt you are right it is incredibly fascinating subject learn on case arrested Dmitry Orhei I’m afraid I won’t disclose anything has high at night are we without at all concepts flashed thanks slushies listen, please bring us the model the best glasses grams 300 us qualitatively understood if after death a person falls into a lethargic sleep since she is on the ground, she walks in lethargic sleep falls into and this is already another part of the soul and in total how many are you 7 in body and also from part of the soul and name if name your concern you never enter 20 and not gain much connect this unfortunate converted in them hell will not get into heaven in quantity there won’t be an ace tone why is his personality her personality her health top from details Well, what did I tell you, see how much people buy the newspaper and ladies and all this your merit is priceless maltesers need I must admit I was pleasantly surprised Alexey the city never failed to investigate it’s normal that even my best is possible author attack I’m very curious where from you learned all the details of this ritual murders I do not disclose my source and how did my father come to him barney only one famous one and I don’t know maybe be age or somehow external you can describe it, you can see that you are so beautiful only the eyes are cold as if made of steel age in our time and at 25 for an old woman and now even at 40 I don’t know any beauties I’ll tell you OK, but you will recognize these things if they you hat is precise and dipper is quiet as in your opinion, she had to do it to him he loved him still loved him so much how did he love you I love you my life my destiny everything that I have I have all yours you have nothing of your own the rally is developed this was and keep busy waiting for you with everyone on and for all of us common A and then what, well what happened next maybe they we had a fight once how should I know she was me that day I figured out why you’re busy I’m you a certain Pavel Martynov will ennoble there came from Petersburg, speaks on business Aristarchus Mr. Martynov, what do you owe him for growing up to Dmitry Aristarkha sat before and what about him friend no need to see him i’m afraid he is in no way impossible aristarchs is accused of a serious crime and refuses to cooperate with the investigation in similar circumstances the date is not delivered to her then I arrived as I read in the newspapers about I want to talk to him about his arrest the truth about their guilt is obvious only repentance capable of easing his fate ah so that’s it mister aristarchus you are like that and you will continue to remain silent about even three days you test my patience with me the slower you go, the further you will be the master peddlers may explode If you want to go to the dungeons in St. Petersburg, it’s not easy I will have to, I tell you for sure, well then that you will answer questions and therefore I don’t think you can do anything, you just autumn young inexperienced simple-minded man daddy noble company sorry Yakov Platonovich Anton Andreevich They ask the arrested person to come to them hello me which the door kilo Pavel Martynov I came from Petersburg and somehow I’m holding on mission you have to confess everything i I know she was a bad woman in the end much of it you it did not control itself when attacked her with a knife and still murdered her an innocent person for a terrible sin when there is no other way out mouse this is the best way out the meeting will take place attention that the murder occurred because passions you will be shown leniency and soul iraida will finally find peace iraida until Her name was Iraida Suslova I killed her A I loved her more than life, I begged her to be mine wife but she didn’t want it played with me like a cat with a mouse then he caressed, then he pushed away that evening she confessed between fell in love with another I felt some kind of clouding over me grabbed a knife from the table and stabbed her stomach yes, I think I read something a third of the time similar to Prospera Merimee and then you made a mummy out of her I didn’t want to part with her and her body no way the chemist was interested in conducting similar experiment I stole caustic soda from the lab faculties and they took some in reserve for the future, well, for some reason they quickly cooled off towards the corpse to his beloved and therefore decided sell it at auction Iraida Suslova 26 years old participant terrorist faction of the organization appeared after the defeat the people’s will is the only one who succeeded went into hiding seven years ago after an assassination attempt on the sovereign emperor all this time the police are looking for her and we found her is it incredible luck or great the play was played out I don’t understand what you doubt Aristarkhovich himself admitted to everyone yes from the words of my friend from St. Petersburg which as you noticed literally dictated it to him, they recognized it I think you are exaggerating However, it is strange that Martynov did not come. earlier arrived exactly after I read the investigation by Ryabushinsky and essay lady world us which in detail it is written about the scar on her in full eat and find found caustic soda in his basement is irrefutable evidence, because you can yourself introduce Dmitry Aristarkhov hiding a series of corpses extracted from his organs need a strong hand before that well and at least some general knowledge in medicine but also the most important question why it would have been easier to do this, it would have been easier to bury the body forest, by God oh well what is she victor there are secrets in my head who don’t even know my mustache so then we can congratulate you Anton Andreevich you are in for a promotion or some other reward touched 2 you know for me the best the reward is your attention look at I’m more likely to be half but I’m not I deserve yours attention nesting deserves anton Andreevich Wasn’t it the gentleman who detained Aristarkhov? navigator why are you talking about this again I sent he was taken to Aristarkhov’s house just so he wouldn’t waste time having done the deed took on a very serious tone turnover look at this woman, she is a terrible woman You can tell right away that this is not it he won’t stop at anything but what is this not her. another girl was killed in aristarkhov’s house so you continue to insist that no did you know who Iraida Suslova was in fact? there is no point in when and how you are with them We met maybe three months ago four back in the tavern st petersburg the first time but I don’t care anymore believe what do I believe when they tell me the truth Hello, good afternoon, madam mironova I am very glad to see you again please, let’s just do it without ceremony she just came in find out how things are going in your shop much better than I would have dared to assume I have a lot of you, a very well-read public orders and what do they order you want to know so 12 orders for 2 sphinxes is new Mrs. Kryzhanovka’s novel interest in Egyptian theme is unusual I can imagine imagine what else Mrs. Selezneva wants to know the future the complete guide to tarot cards patch mister kuzyakin suffers from gout conspiracies for aching joints conspiracies as a doctor he seems afraid to come a cultured person Mr. Beak wrote out a reference book on cereals Central Russia from the Sabashnikov brothers Mr. School Cycle Piebald Heresy dangerous cults strange are you surprised this navigator he is your friend we them In Zadonsk everyone is familiar with each other in one way or another Tell me, can I order the same one for myself? book yes of course you are interested in this topic it’s so interesting that it’s so simple curiosity please tell me and madam Is she by any chance your relative? this is my mother i can’t tear myself away from her article I still have this in front of my eyes Horrible picture of a masked man killing with a knife in the stomach of his unfortunate victim all this is described in the article you haven’t read it seems I need more pay attention to mom’s bite, sorry Me Polina all the best 2 good henri kira Hello, this is a lampshade have you been to a bookstore is this surprising or this is an interrogation it would have been more like starting a conversation, that’s the same are you heading there no just passing through past Tell me, did you see something at the auction? I can’t say for sure it only lasted a few seconds but you felt bad you lose consciousness I think I I saw So far Nadezhda kill someone with a knife in the stomach anubis not dmitry aristarchus think over and Aristarkhov is innocent I confess to me there is a comparison but you will tell in brides if i see something else, of course i’ll be here I’ll tell you Anton Andreevich, are you trading in this case? good diameter to the righteous plato type and how cute is that Just listen to your growth syllable yogi like breathing and the writer’s talent and doubts and who I’ll write it down for you one reader I now get double more letter should depend on your The essay “Dead” is written quite briskly however, you picked up a lot from it she didn’t lie, she didn’t embellish it for anyone It’s interesting to read about real life, tell me please, you found out about it from me that the victims were stabbed to death and live to see in general I don’t understand the point, but the fact is that now the killer will not be found because the criminal learned during the investigation of the article Mom, don’t talk nonsense, the case is solved the killer drawing yes and we are not in this are we sure that we are who or what do I eat only you know i will never see you again nothing to talk about places you’re just jealous of my success and she doesn’t can you hide it in this family me never understood It is true what is said, a man’s enemies are his own his I need to work I guess I have some things to do too, Lisa please likeness of cats office this minute bar my angel tell me do you really think that’s an idea risks contains innocently confessed to in general there are a lot of discrepancies and the most the main thing will be conveyed by the word not at all looks like the spirit I talked to that you will convince the spirit that such help is not needed so i can take the bandages and amulets former on the mummy they are genuine some value Of course, take it in good health say something and what have you heard about it Aristarkhov’s house will go under the hammer and you will already get money for it your five thousand but I’m afraid that it will be not soon unfortunately we still don’t have it managed to find out where he put all the money from the sale of the collection and he said that he made with real movie ska worth it yes but there was a real mummy priest status what did the tube do to her Now we’ll ask him about it, let’s go me and now suddenly I felt myself like five years ago when you and I were engaged in spiritualism, unraveled all sorts of cunning body glorious was the time I admit we will hide accepted myself with completely return yourself look here this house just gives off something sinister it but to put in the forest far from the city the perfect place to commit crimes but you never said nothing we are here in this house in the basement a murder was committed, they didn’t do it to him right here and so I thought that if on try to call at the crime scene spirit of the girl you can she will give a new the sign is just how to get into the house yes no it’s illegal you promised to help me just hold her asked but I’m a pro hold on, uncle when you asked me for help you did this she did it in such a mysterious tone that I I guessed right away easily and what my talent things can be very even will come in handy thank you how much longer can I just have two hours talked with the navigator and completely exhausted alone what Dmitry lantern after tomorrow you will be taken away Petersburg on the trellis there you can rest and in the meantime answer us where did you put the real mummy, the real one I don’t know mummy money Well spirit Iraida Suslova, appear to me in spirit Iraida Suslova you know I’m almost sure that it is not suslova maybe her spirit port fer is not in the mood today inhale moon and 9 me spirit she is there here payment of which minutes and I’ll come now I’ll come now to let them in at 10 I’m going nowhere Dmitry Afanasyevich Silence will not make your life easier where did you put the real mummy we will find her and I am sure Mr. Golenishchev I won’t insist on forgery I won’t I burned it in the stove broke the burn elephant shape burned god my what kind of husband is my Here Luke Hannes said to be here he is and you were right there are no aristarchs pigeons this means he didn’t kill the raid Suslova needs to be dealt with immediately telegraph to Petersburg how stupidly I was mistaken I was hasty with conclusions and you knew everything from the beginning I had my suspicions right away, so I He kept silent and wanted the conspirators to think. that their plan succeeded, that is, it was not one later my reputation as a researcher supportive does not save itself ahead of time Where Sorry I had to raise the salt on you later private business does not tolerate we just got some delays telegram about heroin and suslova detained at the Lithuanian border cannot be this is some kind of mistake with her your friend is arrested Pavel Martynov I’m not going to do it in pairs leave Russia withdraw a huge amount of money money rules until we what a scoundrel I should have guessed pretty well invented me to hard labor and he himself was given money for Wednesday border great plan and you really are good for the first time gave away all the evil inheritance a friend with his mistress and then they confessed in whose murder they did not commit the inheritance is laid Dmitry swim was going to sacrifice for a good cause the maintenance of tyranny liberation of the working people 9 just talk about if for musicians and you look tired she you should rest and get some sleep, you’re beautiful there are no methods here but I enough enough what do you want what are you watching boffin something meteorological obviously something atmospheric in spring close often it happens why can’t you sleep I’m writing a new one the article is called return although there is no better name, I have one better than another smori mukhin and why did you need akinator explosive device before the body played burying Moscow I took on the task of making a governor general Iraida had to prepare the bomb in Moscow we had surveillance of the police they think wearing it from the dead is all a lie there was no conspiracy, she just was going to run after us legally everything exactly as you gave it or didn’t give it order of the solicitors of many of their Moscow and there I handed it over to the man myself I was going to go after her the day of her arrest and where were you going to meet her? abroad the house of the merchant Zatulin nad Molokans Zenkah ask Akulina show Aristova wait you didn’t catch them right I was deceived, they played on my feelings made a traitor I saved you from hard labor if you are sensible you will get rid of it link you have a chance to start a new life don’t miss him take him away took bravo-bravo Yakov Platonovich you did it smartly, you had to do it smartly telegraph to Moscow immediately if They’ll be lucky, they’ll arrest Suslova today. At night your superiors will appreciate you even more no oil their fleet night it’s you you it’s I do disclosed anya I just believed in Tarkh Internet speech I I kindly ask you not to tell anyone about this speak no more than convenient if laurels of the main detective Zatonskaya you will get the same case of the mummy chase finished that’s right we don’t have no victim I’m not a criminal, maybe it’s a secret such will remain unsolved in no way I won’t give up in this case, especially now when we almost certainly know what and the murder and embalming took place in in the basement of Aristarkhov’s house you need Be sure to interview everyone again were closely acquainted with the calm and could something to see for u besides the old woman the housekeeper didn’t communicate with anyone, she was tired of being let’s start with her at 11 in a good way the attacker on I admit I was surprised by the letter that delivered you were put in jail need yours help yesterday in the basement of the house of aristarchus in power spirit here mass seriously I didn’t want insult you the thing is that he leads I don’t know myself like other spirits anymore what it can’t give ok let’s take it easy no need whether the conversation is sorry well I understand articles 100 and never here but right behind yours back don’t turn around we won’t get it anyway see oh my god said now through you as well as her bin rashid rahma tom somehow it’s so incredible that you understood something from this they 2-mind not only to write and read hieroglyphs oh my god she she oh my god me first you modern scientists managed to hear ancient Egyptian language in my brain free retelling even though I can’t convey it anymore There is no need to convey all your delight delight and to sleep and in the boots I do not have it Understand so you said that you can read and write hieroglyphs vlad boom quickly give paper paint and he and the guests came to the deceased 1 tone of speech No, he didn’t like guests and didn’t invite them into his house. what has he had for all these years served no one ever stopped being this can’t happen my father cannot be my growth at once Andrei part of the year almost 10 months I traveled abroad and when I returned I was taking a break from everyone, but women, really? have you visited or not have you visited abroad? maybe there were, I don’t know, I won’t say and here others had no others except whom Well, what’s there to hide now? we got along how long has he been I did it back then young oh well I’m a fool it seems that’s all Well, here is this hieroglyph definitely denotes tombs well of course we naturally he just wants so that we could bury him and give up the body we doubt the earth but accept the seven parts of the soul unite and enter into afterlife 2 only at compliance with a number of conditions preservation of mummies presence of tombs I’m sure of this I’m sure of this there’s a lot of that that you will destroy him if you bury him in earth what well what does he want from me then apparently so that you could build him new ones there are no degrees necid this is some kind of nightmare story equals steve ask again talk through the menu you need to his plaster teams Mr. bootleg and over the excitement of what open and the debris is still here well then I said everything I wanted for you to translate it wrong, looks like it’s right after all wait I think and it seems I have onesie what are you doing this according to words judges this means the document is approved that you we wrote in the document what we want build him a new tomb but for this it will take some time mother may several years maybe. but it’s quite true, look at this congresses of Russian artists German professors called on to create a well Museum of Fine Arts success here look at this sketch won the competition project for the future I really wanted to buy the buildings mummy for his collection but now with joyfully donated to the museum as soon as he will open again the same thing, brilliantly that’s hopefully your problem transition to only 1 of 2 what is the second who was the girl they made mummy just admire from Moscow you returned the telegrams of moscow union Iraida Suslova arrested revealed human conspirators our too congratulations, it would be great now can they go home you can go I I’ll stay and rummage through the archives of those photos tonight you are an amazing person you are one of those people which if they don’t find the way that some you will pave I need to find out if anyone has reported it missing girl woman in recent years how many years do we keep archives for how much well here for so much I’m afraid that I sq Plato, you can’t handle it alone why are you sitting like a queen on the dishes yesterday’s dishes were not washed, but what do I need? here you are on the farm and I am for beauty I’d better not get my hands dirty he’s just I will save this transfer Here Here I will give you death, you will live I will fall good afternoon good morning doctor me reported that you asked me urgently lamb say goodbye disturbed the doctor but here list of missing women with our province could you please look at the parameters according to the description, they match the parameters our mysterious mummies back to the list not small she victor on Today in the hospital you know, I’ve been working on this lately wear and tear so I ordered her to go home and have a good night’s sleep then all the best let’s go I I’ll arrange for this cool one to be left back Phil, would you please, young lady, another Praskovya fox I was told she lives here but I’m a simpleton come on in Don’t be afraid, we are charitable poor relief societies he will come to you bring out the medicine if necessary, well, thank you very much sit down good morning girl but let’s see what can we have for example ryazanov glafira petrovna long ago calmly stopped sleeping, maybe she’s translating something There is although I can’t sleep in the important place and my old sins gives me no peace find out is looking for the owner your belonged to anubis god of death your veins stand when you look at something like this in a dream you will dream about it and probably from I don’t understand if you can die from a heart attack what are you getting at? You all understand Praskovya, you all understand all of this you see i know that it was you who killed that one I killed the girl the master then went to the surgeon’s office during the week and how do you live here among Aunt Pasha horrors of these the dacha and gave them to these nasty ones who the masters are standing in the basement, what are you talking about you understand, all this is ancient history money is worth perast andrey took me I was just bragging there, I was just a little bit godlike gave her soul fear mortal special demon from the stove he scares me with his head at night nightmares are breast I’ll have a sofa like this immortal one fear you will run away from home yourself A call A Tatiana news when once Andrey Chern told Ulyam that In the morning Tatyana was found dead in bed he moved her body to the basement and what did he not do there I don’t know I grieved for six months and then they came to me again called for himself enter into the finger ease your soul, the court will take into account that it is murder it was unintentional no, let God judge me, I’m growing Andrey loved him all her life and gave him he brought this young man into the house and he made me serve her when she was dying and not a penny left all of you us for people then don’t count only Dmitry Afanasyevich was good You can’t understand a person’s life children finger and that’s why I Why did you go to Praskov yourself if something happened to you I wouldn’t tell you this forgave I wanted to test my hypothesis today they approached me especially since we you have already reached Tatyana Stolbov former service of the elder aristarchus and you know because it disappeared 30 years ago you compare but the perfume is mine ours how much longer do we have to wait and yet next time when you want to test your hypothesis what other time will there not be a next one I’m not tired of it once, I won’t be yours anymore she saw it as a hindrance to catching criminals Jacob Ladovic how i missed our company and here we are together again I thought why not play music for us today she ryterna I will support yours party graceful 3 small unfortunately today I can’t do it Come on, you’re Jacob Plato revealed now finally left there are always more important things to do than cry for example, delving into the study of dangerous I don’t believe what you mean by remote controls Annabelle wanted to decide both sides are upset today there is no more terrible person than that who has forgotten how to rejoice finally I’ve been waiting for you for a long time Morrigan Help youtube what mask I had a nightmare again, it’s all from nerves I’m not a drinker or a motherwort The doctor died more than a year ago maybe you can calm down and not torture yourself Prepare a dress for me, maybe I’ll go to the city will she accept me someone who will take my place with the ceiling elon it is Anna Viktorovna please steal for inhaling that say anything someday and your voice and hear yours great-grandchildren today is june 6 1894 weather wonderful and me and Andrey Petrovich voices, dry, so unpleasant that in so to persuade you have a beautiful voice and it seems so for the first time Good day gentlemen, I can and will do it everywhere Mironov it’s me it’s good that you are here I came to you on special business, they say your gift has returned, you won’t refuse, help I need to talk to you, I apologize, it’s been a long time I do not provide this type of service I beg you, I implore you he has no one but me and they have no one I’m trying to communicate something very important. I know for sure she is Victor, help me it’s good to wander and you record the process she is forced to leave you for a while as you wish as you wish, and the son of Van Gleb served as a zemstvo official he went to the doctor last fall sick the neighboring village and I will never return the carriage with horses was found two days later in the fields by the beacon only in spring when the snow has melted, I sympathize with you terribly I started to lose my child, thank you, but I I’ve already suffered my share, only root has been here for a month now Vanechka began to come to me every day night comes in a dream as if he wants tell me something very important is calling me manning Mommy and you, didn’t you die a natural death? the boy killed him and until we find the culprit, his soul won’t calm down ok I’ll try to help you she’s quite the spirit Just monolith you here let’s do it here who is burning for us your strength is this outfit Anechka’s wife died, they have no children it was so and I couldn’t get over her death I was escaping from the grief of work by rocking my child there is no Kuzya horse started the thread is long i am so thin kolkata and thread but of course where am I what kind of hen am I I’ve been sitting here too long, it’s time for me to go home forgive me for telling you nothing said that you were an angel, I would really like you helped God bless you Andrey Petrovich says nothing, I do everything I understand it’s her job to keep the secret, it seems closer to men secret well how did it come mother told you to express something No, the doctor didn’t say anything about it Let’s eat, mother, otherwise we won’t have any strength incoherent stupid niche on the oak the last one came half an hour ago Mrs. Samsonova, they sent for you, what happened? you didn’t say it right away I still have things to do where are you in such a hurry to get things done? maybe you can at least tell me what kind of Victor you are constantly going somewhere you have become secretive and don’t pay any attention to me no attention Well, why is that? You always come back I just have urgent business in the city 3 now the most modern women you work for ryabushinsky you owe me understand and the problem of the modern woman She must have fallen and thrown herself there or helped after the doctor died in the rain is completely wrong I’m going crazy, I’m getting more baths, version look A wipe the lens was heard in a special chest and I’ll take another 100 photos of the bag don’t forget very well that same one yes the reaction still works or take it, they bring it from St. Petersburg, I’m glad to see you It’s just a pity to see Antonovich the circumstances of the meeting are not very pleasant so we don’t meet any other way let’s get to it now who is this person installed Antonina Gleb married no widow her son ivan glebov zemstvo doctor needed ask It would be good if it crashed about a year ago back the horses carried away there to commit suicide similar not similar the body is needed urgently the doctor killed himself manage shower where to hurry now Yes, only on a clear day this Mironov and sent to the next world to Agafya maids Gleba you seemed that the lady went today this they expression and now not even three hours have passed I advise the police to sort everything out in this case, I’m sure he won’t let it go Electron has absolutely nothing to do with you here good side hello what happened unfortunately yes tell me met with Antonina Gribov today how do you know that? Boil it a couple of hours ago his body was found behind the settlement and the enemies are an accident they pushed her with a share, why did she come to you? came to help asked for a scene talk to him and help him Anna Viktorovna could you have to be careful who knows may come to you with something similar You shouldn’t help everyone by asking you know how to connect it’s up to me who to help and who not to help why did I let her go she was so excited, don’t blame her myself You are not guilty of anything, I ask you at least today don’t be sick to the city 1 will someone walk you home chair Andrey Petrovich blood means change worry that is Zaraysky’s dear serve here served as the widow of Gleb war the kingdom of heaven has long been in the economy and on I must have been here for almost two years when the son and the krapov were your honor how Mrs. Glebova suffered at first I hoped he would come back, but when should I explain? the body was found almost every night was a now the doctor’s office is like a museum everything is as it was with him, mistress strictly forbade entry here the schedule once disobeyed and they almost kicked me out who is this maid two of us clear I won’t disturb you, Alexandrovich, I’ll come to you again burst into tears see managed to find out time of death I suppose judging by coagulated blood three to four hours back this is the most important question I’m worried about whether it is itself or not and I ask you to help, closer, closer, here look, see this wound this hematoma suggests that rather all was on the right will strike some blow with a blunt oblong object because if it was just a fall of the blow flat stone that character it would be these murders are a completely different calp undoubtedly . on the way and soul and only one is done my heart felt it was not good, that’s true it turned out to be a number of numerologists it is to this It has nothing to do with the matter, so please don’t spread rumors about you when did the owner last see it like that that’s why she went to the Samsonovs for lunch do you know why young barney economics the people served and where was she at that time here I was obsessed with not being and the household Mother usually got busy by seven in the evening I was returning and I had already prepared the samovar I put it there and then it was gone and gone in the yard you came running and said that I can have flies see doctor’s office our doctor the best would be his departure was very much loved by They even went to him from the province everything here remains as it was when he was alive His mother took great care of his memory I suppose everyone had a mother and son attached to each other however the doctor is a lone wolf young man maybe some love interests were Ivan Ivanovich was decent the man saved human lives for me when he was up to some charade, how do you know that? I asked him to help me, that’s it I didn’t see the tool to save it I arrived sick or here at home as if his life all here thank you for the idea to watch more and his Shura gloomy with the doctor kept silent don’t stick your nose into their business you’ll blab, okay, goodbye to them keep your mouth shut or else You’ll be the one begging on my street understood kitchenette not on gleba reveal spirit antonina gleba reveal stuffiness Yes gold milf confirmed that the widow died she was killed violently by being hit with something on the head and threw into a ravine so that we It seems you wrote it off as suicide to the truth on enter Well finally, how long can you fix one? lamp let there be light thank you let there be light I asked the neighbors Gleb didn’t know him did not cause any trouble and was not in debt and in general she didn’t have many enemies I can’t even imagine that someone had motive to kill her and you didn’t succeed find out and the maid the police boy claims that Gleb la after lunch went to samsonova and also I looked at the doctor’s office drawers for there are not enough tools, a scalpel but the doctor could have simply lost it himself but not It looks like the room is in perfect order the servant says that Gleba is in I didn’t let anyone into my son’s room damn electricity if you think I don’t rule out that she took the drops She came to see Victor today and asked to help her talk to the deceased I heard about my son, everyone is already gossiping she told victor an and we are waiting for her son killed perhaps the widow realized who the killers were and went to take revenge on him but it seems like no one has been killed yet, thank God I hope so too, and take a look The doctor found the body earlier in the spring in a terrible state, but on the head found an elongated hematoma like widows exactly when they thought that he hit his head when the laurel fell but if we assume that he was killed and the widow found out about this and went to take revenge he could be a killer with her 1 likes tomorrow you need to go to samson maybe they will shed some light on this dark case she’s so glad to see you hello Polina, I was just passing by and thought find out how you are doing thank you all Okay, yours was delivered just this morning book to some kind of him that’s it yes I already and forgot how much should the set choose absolutely free but if I I’d like to chat with my deceased Grandpa, you will help me with this I’m sorry, I didn’t mean to in any way you are simply offended by the whole city only about that’s what he says and I believe in such things I understand, I just have a headache every time when it comes to your wonderful gift yes I understand I promise more I will never ask such questions questions only if you don’t want to it’s just awful to talk about this topic I wonder how everything works in the afterlife world I’m afraid I can’t tell you anything can you really ask everything? simple you feel that is questions which you shouldn’t ask how much of it in the hall there should be 2 rubles 45 kopecks forgive me again, I feel terribly embarrassed I wouldn’t like to lose yours location and you forgive me and in the company gets angry and 3 to you in a few days yes yes and at the same time tell me how you like the book I scrolled through it and it seems to me there is a lot here curious I’m in a hurry what is this in the heat of the moment yes, you should have had the tome long ago known for riddles you say Unfortunately I don’t have yours an extraordinary gift so there is no answer I can’t do 1 book at a time I’m in a hurry like the next time, I’m very sorry now I’m going to the heights of the book Samson widow Gleba worked as a housekeeper and not for nothing but a smile his death was given and who is this samson phoenix went on him before gold industrialist recently moved from Yenisei province malt his wife Anastasia Petrova born especially for this through the tailor made a good portion tailor where the needle goes, the thread follows and someone started can you wait for me i treat u the doctor changed and of course I will go with you I will wait for you and dear math is true but it’s beautiful wonderful sincerely scandalously new you wrote beautifully boredom of family life cooling of spouses in marriage there is no opportunity for a woman do something useful because of social prejudices but marie timofeevna be prepared for you all the Domostroy fans will pounce and after that the fight will start better than the origins I I think so too and believe me we will fight I will lead you I won’t let anyone offend me, so I agree with you by me what a modern woman needs some business maxima fiona I confess to you if I were with you for days It’s been a long time since children have been cooking vinegar-ba so you weren’t married alexey Yegorovich, I’m not inclined to family life. life does not need a wide field of activity space poland inspiration i think you would be funny husband that i had because it’s not boring well who knows precious and Stima Fiona, who knows? when did you propose, madam? Glebova I work with the death of the doctor and I felt sorry for her she was left with just one book and even you were without means of subsistence I know the doctor, of course, when I was still lived with my father he often depends on your father I didn’t really make friends if anyone Of course I always got sick because they didn’t send me he was a wonderful doctor will there be an illness he could have cured us and we had guests he was driving that the judicial investigator is mine assistant anna viktorovna mironova we are here on the case of Mrs. Gleba Lai yesterday her body was found in a ravine not far from your house you already what a grief poor woman first son now yourself you sit down I know she helped you you were satisfied with the farm conditionally the woman from the housekeeper is slow and this one seemed to be Nastenka kept Nastenka at I am so compassionate It’s strange but Samsonov’s article is not at all loves her husband bi-2 transfers he seems like such a gentle person Anna Viktorovna’s appearance sometimes it can be deceptive why was I there I need this marriage no more money many would consider this reason sufficient anastasia petrovna says that the doctor often visited her father’s house he lives here not far from the village let’s visit his father anastasia do you think he might know something else? patients know about their being korra much more than the doctor and the attack consecutive tell me dear peter said shamin lives here that’s right, your honor, that’s what it is neighbors you will be a coachman he served somehow his guests cleared it out somehow and Antonina came to his expense Glebova I don’t know anything but my eyes speak you know, you just don’t want to talk she came to see him when they had a row about fastening in the stable it was audible although we had a fight I don’t know, there is no habit listen to that therefore She jumped out angry and left for both of us. definitely left definitely-definitely in my own eyes because how did you know about this? chris repaired injured how can my doctors not remember different was small do you know what he taught in st petersburg capital stas but preferred to return to hometown was not of local caliber man I offered him my clinic if the whole province were to open it, it would go aus refused to be modest the main problem of a kind-hearted person the suspension joints are climbing forward noble people are left behind need to attack so you can lines grandma do not forgive this is your child his knees to be born my boyfriend you can’t do that to me, it’s the same as modernism tell Mrs. Gleb the mother of the deceased the doctor came to see you yesterday and how came and went nothing it lasted famous quarreled to find out something how much did the apprentice axle tell I’ll kick out the scoundrel so that the parties what am I nick she asked and I refused she in tears here began to moan doctor how much he helped us but what did I do to enrich ourselves or something I myself can barely make ends meet so I kicked her out By the way, I saw how many times she came out here to reveal seems to be a tailor’s craft passed these Well, now I actually take fewer orders Thank God I took an x-ray and it helps it was said that you will take away the region of your son there have they simply forgotten about Kim and his the child’s mother didn’t believe him how much I fell many allow him to leave I will only work twice as hard let me just say I agreed that I didn’t man what does it mean how much from the master yours exactly your chest you yourself ask him and we will definitely ask, thank you Mr. Fomina at least the apprentice confirmed that it was his child on have a last name I couldn’t name right away covers for the owner but why would Fomin lie? he is a widower and I could well admit it no one would say anything bad about the child I thought Anna Viktorovna said that the child lives with a nanny, he lives with his mother and the mother must have died of mushrooms in family doctor fominykh maybe he they accepted the freak and something went wrong in that case Fomin could do everything blame the doctor and decide on the spot here They tell you that the doctor had a motive a meticulous person wrote down everything names patients carefully kept medical cards let’s go to the house caliber now immediately I am faster than the wind in an instant uncle are you reading? I found my medical journal. Andrey Petrovich to himself after lunch it happened how sweet nick ration is carried away to forget it seems to me you you got seriously carried away a long time ago in Baden-Baden in one young woman and the heart and the doctor who arrived in time were famous did it to her mouth to mouth breathing already then I understood that for the most noble profession now I think maybe I should schedule some visits medical courses Petr Ivanovich and beyond This will happen to you in a week, but why? where is it very interesting to get advice life is to do something useful why aren’t we going I promise myself something other for example until a daughter gentlemen, maybe tea, no thanks, but I’m with We were very pleased with on April need to look at the case all good for the last year and a half if the child It should have been more than a year now to be just on the eve of the doctor’s death original conclusions, gentlemen let me help you who do you know better than me what is here and where lies what records do you need nastya pro hands-hooks I’m going to die now you are in us Wait in the living room I can’t believe my eyes how the fleet night maps found Akulina Baranova isn’t that his wife the very groom Baranov who lives next to Fomin so she is he died from 14 months ago extensive bleeding i’m going to let’s go what gentlemen found what they were looking for more than 100 found Doctor’s office, don’t go in don’t touch anything as you command and the little ones need to go to help, it’s an urgent matter. We’ll clean up the doctor’s office mister investigator villain nothing touch you listen to the pulse of others Baranova died two weeks before how the doctor disappeared laziness everything fits together a bunch of sheep a healthy man would be good for him one blow was enough to see a doctor he knows the local roads firsthand and catching a carriage in a snowstorm is a once-in-a-lifetime task for him spit think and balloon you maybe me I saw a scar on his arm, well, it seemed like scalpel cut besides, we know that Gleb is his came to the fireplace that evening rams lives nearby so he could see and know where did she go next A llama you are here What’s happened and I don’t understand wiki hurry up where is my house I’ll listen to what they write, listen to one the young lady still hasn’t worn a tailcoat in three years managed to give the man an heir and protests turned into the house of the dead Gleba I am the only one with you weighed pancake yes already night almost your hydrogen what have I done to deserve your visit late knee your wife is sure she didn’t die kingdoms and heaven you will have to pass with us why is that better not to resist otherwise we will have to use the force of the yakups and aquaton I grab please explain and what’s going on here your coachman suspected of murdering his doctor mothers detained pending investigation circumstances as otherwise why would you tell him saw Mr. Baranov the day before yesterday in the evening when the widow Gleba vocals I came to him, but he wasn’t home I just wanted to visit my daughter, I thought ask him to bring me and I knock knock to him and there was no point in it in the world with empty talkers I think you are so so are you sick of slandering me like that now? how much how much I want here and the swastika the first half tell me who is right me or that one shaggy the day before yesterday evening I went to him I knocked but he didn’t open, he’s such a god not remembering means you confirm mine words confirming became his plot they call from where you don’t need don’t need 1 we need to call the fire brigade do it capture as here it is there no need for feeding even records doctor I want you do it because of her we want to find him at the private police I’ll tell you the storm on your feet so that it’s not a courtroom fast It’s not my fault, I’m your nobleman, here you go cross here is the cross for you first never on the widow’s hand will be raised she is a doctor and especially a holy man is a holy woman yours didn’t help we all understand the doctor didn’t could help your bullets did not save her and you decided to take revenge on him, admit it you get some relief but I’m to blame for it Death to me, the midwife said, I feel sorry for the doctor, but I don’t I listened and thought everything would be okay when Akulenko arrived with my blood and went in the doctor said that she couldn’t be saved the child is alive, then I have a son thanks doctor how to do now as i do He gave the neighboring one to his sister village well where is he I’m not a woman I have we saw no breast to feed him mother with a share of Fomin will not give all this the child so nobody knows there are rumors that it was said about the foot somewhere his mother died, so he conscience took him to itself a long time ago I can’t say for sure last fall and Kolka innocent my dear tell me where have you been that evening when the widow went to the ball visited Fomin Tom was at the evening myself dorykh o or and what then Fomin says that there was no you and him apprentice Kolka confirms yes the devil I know them, maybe the sound is like you on me, but or they want to get rid of it come in later mister navigator me sent to tell you to go urgently to house of widow Glebova in that ambassador lady young beautiful I’ll go with you who shave stay here the interrogation will end treason flour couple ribbon ram solis abscissa sounds beautiful especially earlier arrived I wish there was something to thank for here she is left good night Andrey what happened me I’ll save myself Agafya tried to burn papers Doctor Glebov we have children succeeded we almost don’t have the master to save something Schulz good night tear off where now she ran away I tried to chase but she seemed to have a swan parting look what i found agafya lost I really didn’t want a 4 month old baby so that it becomes known, but why? it was to burn everything well most likely she was illiterate couldn’t so we want to explain your map for similar grass how did you end up in this house at such a time late hour as you can guess we asked to come here tell me why have you been serving here for a long time? coins of the ussr 2 entries and the murano was twisted by the doctor and strongly I was afraid that you would find out about this, go ahead think like an offer for a child from a doctor it became possible for example look conceived looking if agafia show up and let me know I obey your honor she restaurant you know how I immensely I am glad for your help and appreciate your participation in investigations new then we arrived in Gleb’s house you are in the middle of the night it is dangerous well what to expect with you if I didn’t have time do you like 5th heaven no no what are you not you should thank me good night good daughter what were you looking for here I’m like Plato here we will excite, we will catch and put in the yard in cabinet for which I am not guilty of anything so what is the main thing and what are you for says a year ago you were pregnant lost a child and it’s true ours You’re not smoking any of ours here written to live your life his this is a view and tell about it not to you judging everything is so easy for two people broke down how he even wanted to marry me He just found out about the baby wallet it’s nothing something simple You’ll see how things will heal on their own with you and me the wounded man demanded he knew about it he didn’t have it he didn’t tell me anything, he gave me this case It only seems appropriate to me that this is the old hag figured it all out herself Once I was cleaning and climbed onto a chair or wipe he pushed me, as if by accident and fell and lost the baby buy this there was no peace in the world and I wiped two I was sick for weeks at that time Ivan went to that cursed village disappeared if you say that antonina glebovo why is your child’s death to blame that she didn’t leave because of knowledge when the doctor all the spirit of that disappeared from her mice I couldn’t take a couple of steps, I gave up cried couldn’t sleep at night who was she I’ll leave it like this, it seems to me that she was scolding yourself for your sin then The baby stayed to rest, to her joy now the whole world is alone you’ve finished your studies, you’ve caught a cold, maybe he’s not there she didn’t ask for forgiveness I wouldn’t kill red bottles let’s talk about what the hell you are Baranov is accused of murdering Gleb immediately section but I know what I’m thinking about, I can say what are we lying about? but he was home that evening conscience me husband of which was said that I collected at your instigation and here it is goes to calm her down, can’t do this, that’s from will calm us down a little bit if I add it, it seems to have calmed down now you’ll become very quiet, your lips don’t roll it out or else with me you will go for perjury I wanted to understand, so here you go, sassoon, you’ll take it away Give it to Nastya personally if anyone else except and will see your path understood went tell me uncle this is definitely what you want If you changed your mind, it’s not too late refuse no no I want to know everything the secrets of the human body penetrate the riddle of life from the map so I hope the doctor won’t help me with this I will refuse Pedro glad to see you bypass not enough product good morning on face on you by the way I’m already running no darling I’ll be waiting for you in a week also a common cause you see, that’s what I would like to do some donations for your needs the position here is not very close to me you are small . She said that today according to your anatomical theater will be to be carried out to hide her unfortunate body which Gleba could be present at this peter vegetable pie is too loud umbrellas chesky theater we only have a morgue parade happens but then for mercury spectacle no not really no yes this account is not please don’t worry my first sweet well what am I asking in that case right now powder and if of course I could turn around quickly and manage to kill the bread his but ram to do it was where easier Of course I had no reason to kill the coachman that she is not guilty of the death of his child what if she suspected that it was he who killed her son and came expose and then everything comes together and this cut on his hand exposes him she rushed at him with a scalpel and managed to hurt but we only assume that Gleba you could have taken a scalpel from them voyage son but it cannot be ruled out that Agafia killed the widow but the doctor is here definitely didn’t kill, it’s quite possible that she did the doctor didn’t kill the sheep, maybe we we will never know who is guilty his death but the difficulty of the rise as if it didn’t sound like we were lucky today and were the deceased had no relatives and there were no about taking permissions to hide body let’s work for science interrupted look I’m making a cut carefully, give it free rein pins immediately boot tell me nerve good no here dollar don’t like wallet took 1c Guy, let me come in, a note from yours Father doors cash proceeds transfer So who’s on the berry bridge? the guy is feeling bad why are you standing there like a table with water what are these parts of boiling water some of me managed to extract from under the nails knocked out I wonder if it is possible to find out what it is I have a friend of mine for the material by the way, they reign, they could see something there in the hallway I didn’t consult the owner of Taliyah he said that most likely it is so called fish you are a burrowing velvet yes this is an extremely rare kind of junk glory Thank God we now have at least some the clue was that the killer was in red fish there in arhat I wonder why he would so dress up where he was going that evening is she red velvet more often Ladies’ dresses are sewn at Agafya’s like this there certainly couldn’t have been a dress from somewhere no money ohana victor sing this damn did not satisfy there is uncertainty in our area two suspects and prove the guilt of none of them thoughts splatoon what you don’t I’ve been meaning to tell you about my father’s condition for a long time tell one night i was returning from however I was walking home and there was a bookstore near this one who did you think I saw the color of our mysterious forensic investigator yakov Platonovich and he knocked on the door and the door the door opened and some woman said I I’ve been waiting for you to come in for a long time I came in, I beg you, well, Anna Viktorovna forget about him he’s not worth you i don’t I know what he said over there about him disappearance absence but I absolutely I’m convinced he wasn’t honest with you before the end of this bookstore is working on lines young educated very beautiful woman I won’t be surprised if he ticket not for a secret meeting of all on the lan 3 you well let’s not me not the navigator’s inner torments are interesting You can’t even imagine how happy I am I would give everything in the world to hear this your peace of mind suddenly remembered that you were a little before back he made proposals viktorovna Anton Andreevich and then really I was very sick at heart knowing that you did it out of the most sincere spiritual motives and I never I’ll forget, I need buns for the pastry shop where are you going my soul he sent a note to visit daddy that he is not well, so why should we? breakfast him together it is not to go Alexey I would really like to give you now sew my dove let’s talk for six months now men from Everything seems to me like you’re hiding it You don’t trust your husband for some reason get busy I try, I do everything for you your daddy his debts his flesh bills are written out but you won’t lose much money that’s right it just seems to me daddy your sons don’t know about this money he abandoned his business in taverns he’s wandering around, getting drunk, it’s not my fault I don’t blame you I just think maybe I should stop give money to your daddy for a while don’t do it until it forms then if he goes even lower, he will disappear completely If you don’t want me to go anywhere, I won’t go anywhere. I didn’t take another step without yours just don’t leave him without permission your help you are right I am a weak man it is said that whoever is without sin, let him be first throw a stone took on helping so help and don’t judge and not only that you my wife took for yourself then everyone who is near and dear to you just do me a favor if you do me a favor hiding something bring it and we know and I will not forgive betrayal she you have no idea how i am I made a fool of myself here was it worth it francevich bring in searched do I slapped a small cut on the as jar but thanks to your confusion the doctor found a new snail about i immensely I am grateful for this at least some debt tell me uncle why does a man always lie woman zone it depends on different reasons for example, you love one and confess her in his feelings and at the same time has an effect signs of attention from another how is this possible, it’s just meanness and above all it is extremely simple it means that I like this and the other than you you ask if it hits I am such a soul and twitch in life there are situations that are very difficult and sometimes not allowed and you love one, you are forced to live another life or vegetables 6 in front of the whole world for by someone just so that no one else guessed who yours really are your heart belongs So we filmed it as if to get a breath she herself is straight are you okay good night see you off No Anastasia Petrovna, come to see you, madam Mironova Anna what a nice surprise please me forgive me gentlemen, I came to you without an invitation It’s okay and I’m so glad to see you We rarely have guests, so what are you standing there for? please sit down thank you let’s drink tea what do we owe part again see here madam is served section to your wife probably pieces seriousness investigation no of course not this is purely a ladies’ question I think you will find it interesting at night very interesting way last time Anastasia Petrovna was like that on you beautiful dress i would like to know who I would have come out to you now on the row above all praise you have incredible taste you know completely I recently returned from Paris and I can say that even there that you are a fashionista give die for with ease add you are exaggerating not at all no, Zatonsky is all that’s talked about your toilets still how lucky he was with husband wifey points souls and do me a favor show me ladies world new others their on I with joy about such happiness red velvet is rare and expensive fabric We need to interview all the tailors in the city if they ordered a dress from it, then for sure remembered or have already asked yaks Platonovich Zatonsky with this fabric none of the tailors it doesn’t work and the Fomins were interested in is it worth it and previously worked only with shirt my date with loops and now and completely I have abandoned my business and nevertheless I would like to talk to him again about something Velvet hides a good reason pay him a visit for one of the under master let’s talk anton address you Today Sana Quiz saw Yakov Platonovich, would you leave her alone? take care of old wounds I understand what it is It’s none of my business but you don’t love her anyway it seems like you love Shouldn’t you know that I don’t have any I don’t have a chance, I’m not a noble commoner she is absolutely not a match for Viktorovna Andreevich will feel it and believe me I am grateful that you have been there for all these years longer to play with a faithful friend and heart and sq platon anna viktorovna the best of all the women I have ever met her life and she is worthy devoted love of the greatest happiness even if not with me look at the luxury that was woven your husband is really very Fedor happy nastasya petrovna Unfortunately, the festival needs more than just drags toilet 8 is the most luxurious amazing fabric do you want me to give it to you I will give why Alexey Eduardovich gave it to me as a gift our button with the eye but I’m not a resident you again often I got married the father’s wealth is his business, even so not bad, there was no money at all and then this party I did not dare to refuse handwriting not you shawl Although their in a hundred pro and the heart driver does not sound I need to go to my father otherwise something will happen that I am not a part of I’ll survive the spin, one thing won’t let me in, it’s watching he might be jealous of my every step if you go with me agree let’s say we’ll go to the milliners for a short while tell you dress what do you say it’s time as soon as not 1 part no one in zadonsk such platinum from all into matter and lead and they decided to take the dress to St. Petersburg Nastenka and a vest for Petr Gavrilych there is from deposed to Anna Viktorovna please come back soon I we run from roses I begin to yearn I absolutely cannot exist without her impossible as the priest said so don’t do it until you’re out of your mind it will be as the owner said I promised you money so you are a mother of rainbows top she will somehow be an innocent person That’s right, everyone, it’s time to go Sashenka Sashenka 1 my Sasha where are you going, even though it’s your shelter give the boy back to me Anastas Petrovna kill Now I won’t give Sasha to anyone else so pass on to your father the memory of what you are like why is everything here ul yes boy give The husband didn’t come for the above reason what did you swear wasps don’t care a now with IMT they decided to hand it over without a so if alexey yes i don’t care i I won’t let go of Sinku again husband’s name is your work in the field then install the program like this it’s your guys Stasik this is an idea and why is it your father I just mentioned the field what’s wrong with you anastasia petrovna it turns out it happened that night when Doctor Propane you killed to hide your secrets and you knew everything and covered for your daughter in time I somehow killed the man who saved me me and Sasha, the doctor got caught in a thunderstorm, maybe they didn’t carry him he fell on the enemy and the widow Gleb and you are in this style because she somehow found out that you were her killer I didn’t kill anyone, son, I’m not guilty I would be crying right now if I were you they broke her skull and threw her into a ravine your father and his assistant slandered the groom of the baranova he will go instead of you hard labor cool that’s true why did you do that go and negotiate with us and even more more more more that’s wonderful that’s all I let it slip I’m adding you legs were born healthy strong boy a real hero visit as soon as possible home I don’t understand at all how you feel about her situation and we were let out of the house, the doctor didn’t notice let’s tell you quickly what you can do there your cart we even smile smile smile You a second of birth but now doctors thank I am not a doctor in the East Thank you but about what such are just don’t tell us about what you have something happened to us Of course I understand everything I suppose it was you who killed him, yes gentlemen I think the figure should be goji yo red velvet of the same one from which your dress is sewn I will give you a present you won’t prove anything what is the truth to say how many prisons he doesn’t want me to tell you I’ll tell you everything-everything how I understand that heap has nothing to do with this matter true, very true, it has nothing to do with you advised me to point it out to him for you the highest and you don’t be afraid tell everything as it was proven so like tomatoes I would from it came out here is the key cheater now and itself followed her red pitted velvet arrived here are the Etruscans that very reception was what the respondents were on there is no more room for denial I advise you to tell the whole truth will ease your punishment what I won’t tell him in the suburbs Okay shoemaker, we didn’t fall in love with you. my friend was very unhappy, he was not rich and we Now and because I went to Moscow, there is one there they stabbed me and then I realized that in position to take then the fourth argument in the room sapir to the street I signed up to go, but when the time came midwives from the village of asane the primal when we exited we said that nasa tenge Well done, he’ll strangle me then I’ll run away from focus will have to be how good that we met so dearly left is good he is happy that he helped Sasha come in come into the world a feeling of horror you said he got A man’s duty is to grant him the kingdom of heaven how i stuffing was born i didn’t put that when taking a photo, take a place to collect and let go then for six months I’m like in the city came and my father started to tell him praises to take a photo of the widow brought you they were afraid, even though they themselves were not tired of getting married that the father wants to take care of your son agreed my soul what is going on here why did the police tell me petra they said they arrested me and this one is exactly what I am with you the patron of situations please let’s go out of the house you look after Sashenka but Connors Well, Antonovich, congratulations the case was solved for them, there is no one. I just can’t understand why Fominov had to be killed Gleb even if she came with accusations in the death of her son but what are her proof who would believe her is needed there was a housekeeper at anastasia samson you I’m sure you understood that there is something extramarital son started blackmailing him that everything she will tell her husband that he will allow this already minutes besides who killed once I will definitely want to kill again I know exactly how Anna ended up here Viktorovna let’s ask her, she’s still here So what does this mean? 4 isn’t even a scandal it’s a disgrace never I will never forgive you for what you dared to deceive me, I am blind your father turned out to be a lost man it turns out he’s kind torturer and murderer and diberis and on we are going home guilty . poster Let’s the country is victor and why did you suddenly decide go to the house of samsung and went to the place crimes comrade there was a scalpel on which there were for a long time particles of that very red sobbed beard adams as if you are very close to it place so I decided to go to them and see if any of them have an outfit from the same material as you found the scene of the murder and even without hurrying It’s good that they agreed on everything, yes I’m also wounded for them Now the child will grow up with his mother maybe anastasia will love her husband and do you think that it is possible to fall in love a person just because he is kind and noble, why isn’t the speech ready? crazy passion rarely leads to fortunately she is a calm attachment and trust opposite I don’t recognize you Anna Viktorovna about and you speak as if you were the headmistress of a girls’ school

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Exploring SQL for Database Management and Data Analysis

    Exploring SQL for Database Management and Data Analysis

    The provided texts offer a comprehensive introduction to databases and SQL, covering fundamental concepts like tables, columns, and records, alongside essential SQL commands for data manipulation and querying. They further explore the role of SQL in data analysis, outlining necessary skills, qualifications, project work, portfolios, and internships for aspiring data analysts. Advanced SQL topics such as joins, subqueries, stored procedures, triggers, views, and window functions are examined in detail through explanations and practical examples using MySQL. Finally, the material transitions to PostgreSQL, demonstrating similar SQL functionalities and introducing more advanced features like case statements, aggregate functions, and user-defined functions, while also discussing the importance and top certifications in the field of data analytics.

    SQL Fundamentals Study Guide

    Quiz

    1. What is the purpose of the GROUP BY clause in SQL? Provide a brief example of its syntax. The GROUP BY clause in SQL is used to group rows that have the same values in one or more columns into summary rows. It is often used with aggregate functions to calculate metrics for each group. For example: SELECT department, COUNT(*) FROM employees GROUP BY department;
    2. Explain the difference between the WHERE clause and the HAVING clause in SQL. When would you use each? The WHERE clause filters individual rows based on a specified condition before any grouping occurs. The HAVING clause filters groups based on a specified condition after grouping has been performed by the GROUP BY clause. You use WHERE to filter individual records and HAVING to filter groups of records.
    3. Describe the main categories of SQL data types discussed in the source material. Give one example for each category. The source material outlines several main categories of SQL data types: exact numeric (e.g., INTEGER), approximate numeric (e.g., FLOAT), date and time (e.g., DATE), string (e.g., VARCHAR), and binary (e.g., BINARY).
    4. List three types of SQL operators and provide a brief explanation of what each type is used for. Three types of SQL operators are: arithmetic operators (used for mathematical calculations like addition: +), logical operators (used to combine or modify conditions, like AND), and comparison operators (used to compare values, like equal to: =).
    5. What are SQL joins used for? Briefly explain the purpose of an INNER JOIN. SQL joins are used to combine rows from two or more tables based on a related column between them. An INNER JOIN returns only the rows where there is a match in both tables based on the join condition; rows with no match in either table are excluded.
    6. What is a subquery in SQL? Provide a simple example of how a subquery might be used. A subquery is a query nested inside another SQL query (such as SELECT, FROM, or WHERE). It is often used to retrieve data that will be used in the main query’s conditions. For example: SELECT * FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);
    7. Explain the concept of a stored procedure in SQL. What are some potential benefits of using stored procedures? A stored procedure is a set of SQL statements with an assigned name, which is stored in the database. Benefits include reusability of code, improved performance (as they are pre-compiled), and enhanced security by granting access only to the procedure rather than the underlying tables.
    8. What is a trigger in SQL? Describe a scenario where a trigger might be useful. A trigger is a stored program that automatically executes in response to certain events (e.g., INSERT, UPDATE, DELETE) on a particular table. A trigger could be useful for automatically updating a timestamp field whenever a row in a table is modified, ensuring data integrity or auditing changes.
    9. Describe what a view is in SQL. How does it differ from a regular table? A view is a virtual table based on the result of an SQL statement. Unlike regular tables, views do not store data themselves; instead, they provide a customized perspective of data from one or more underlying tables. Changes made through a simple view might affect the base tables, but complex views are often read-only.
    10. What is the purpose of the ORDER BY clause in SQL? Explain how to sort results in descending order. The ORDER BY clause is used to sort the result set of a SQL query based on one or more columns. To sort results in descending order, you specify the column(s) to sort by and append the DESC keyword after the column name(s). For example: SELECT * FROM products ORDER BY price DESC;

    Answer Key

    1. The GROUP BY clause in SQL groups rows with the same values in specified columns, often used with aggregate functions for summarized data. Example: SELECT department, COUNT(*) FROM employees GROUP BY department;
    2. WHERE filters rows before grouping, while HAVING filters groups after GROUP BY. Use WHERE for record-level conditions and HAVING for group-level conditions on aggregated results.
    3. The main categories are exact numeric (e.g., INTEGER), approximate numeric (e.g., FLOAT), date and time (e.g., DATE), string (e.g., VARCHAR), and binary (e.g., BINARY).
    4. Arithmetic operators perform calculations (+, -, *, /, MOD). Logical operators combine conditions (AND, OR, NOT). Comparison operators evaluate relationships between values (=, <>, >, <, >=, <=).
    5. SQL joins combine rows from multiple tables based on related columns. INNER JOIN returns only matching rows from both tables based on the join condition.
    6. A subquery is a query nested within another query, often used to provide values for conditions in the outer query. Example: SELECT * FROM products WHERE price > (SELECT AVG(price) FROM products WHERE category = ‘Electronics’);
    7. A stored procedure is a pre-compiled set of SQL statements stored in the database, offering benefits like code reuse, improved performance, and enhanced security.
    8. A trigger is a database object that automatically executes SQL code in response to specific events on a table. Useful for auditing changes by logging every update to a separate history table.
    9. A view is a virtual table based on the result of a query, providing a specific perspective on the data without storing it directly. It differs from a regular table by not holding persistent data.
    10. The ORDER BY clause sorts the query result set. To sort in descending order, use the DESC keyword after the column name in the ORDER BY clause (e.g., ORDER BY salary DESC).

    Essay Format Questions

    1. Discuss the importance of data types in SQL. Explain how choosing the appropriate data type for a column can impact database performance and data integrity. Provide specific examples of scenarios where different data types would be most suitable.
    2. Elaborate on the different types of SQL joins (INNER, LEFT, RIGHT, FULL). Explain the conditions under which each type of join is most useful and provide conceptual examples illustrating the results of each join type using sample tables.
    3. Analyze the benefits and drawbacks of using stored procedures and triggers in SQL database design. Consider aspects such as performance, maintainability, security, and complexity. Provide scenarios where each would be a particularly advantageous or disadvantageous choice.
    4. Explain the concept and benefits of using views in SQL. Discuss how views can contribute to data security, query simplification, and data abstraction. Describe different types of views and their specific use cases.
    5. Compare and contrast the use of subqueries and joins in SQL for retrieving data from multiple tables. Discuss the scenarios where one approach might be preferred over the other, considering factors such as readability, performance, and the complexity of the relationships between tables.

    Glossary of Key Terms

    • Clause: A component of an SQL statement that performs a specific function (e.g., SELECT, FROM, WHERE, GROUP BY, ORDER BY).
    • Data Type: The attribute that specifies the type of data that a column can hold (e.g., numeric, string, date).
    • Operator: Symbols or keywords used to perform operations in SQL expressions (e.g., arithmetic, logical, comparison).
    • Join: An SQL operation that combines rows from two or more tables based on a related column.
    • Inner Join: Returns rows only when there is a match in both tables based on the join condition.
    • Outer Join (Left, Right, Full): Returns all rows from one table and the matching rows from the other; if no match, NULLs are used for the non-matching table.
    • Subquery (Nested Query): A query embedded inside another SQL query.
    • Stored Procedure: A pre-compiled collection of SQL statements stored in the database.
    • Trigger: A database object that automatically executes a block of SQL code in response to certain events on a table.
    • View: A virtual table based on the result of an SQL SELECT statement.
    • Aggregate Function: A function that performs a calculation on a set of values and returns a single summary value (e.g., COUNT, SUM, AVG, MIN, MAX).
    • GROUP BY Clause: Groups rows with the same values in one or more columns.
    • HAVING Clause: Filters the results of a GROUP BY clause based on specified conditions.
    • WHERE Clause: Filters rows based on specified conditions before grouping.
    • ORDER BY Clause: Sorts the result set of a query based on specified columns.
    • DESC: Keyword used with ORDER BY to sort in descending order.
    • ASC: Keyword used with ORDER BY to sort in ascending order (default).
    • Alias: A temporary name given to a table or column in a SQL query for brevity or clarity.

    Briefing Document: Review of SQL Concepts and MySQL/PostgreSQL Usage

    This briefing document summarizes the main themes, important ideas, and facts presented across the provided sources, which primarily focus on introducing and demonstrating various aspects of SQL using MySQL and PostgreSQL.

    Main Themes:

    • Fundamentals of SQL: The sources cover core SQL concepts, including data manipulation language (DML) commands (SELECT, INSERT, UPDATE, DELETE), data definition language (DDL) commands (CREATE TABLE, ALTER TABLE, DROP TABLE, CREATE DATABASE, DROP DATABASE, CREATE VIEW, DROP VIEW), clauses (WHERE, GROUP BY, HAVING, ORDER BY, JOIN, LIMIT), data types, operators, and basic SQL functions.
    • Database Management Systems: The documents illustrate the practical application of SQL within two popular database management systems: MySQL and PostgreSQL. This includes installation (for MySQL), connecting to servers, and executing SQL commands within their respective interfaces (MySQL Workbench, command-line interface, and online compilers for PostgreSQL).
    • Data Filtering and Sorting: A significant portion of the content focuses on how to effectively filter data using the WHERE and HAVING clauses and how to sort results using the ORDER BY clause. The use of comparison operators, logical operators (AND, OR, BETWEEN, LIKE, NOT LIKE), and pattern matching is highlighted.
    • Data Aggregation: The GROUP BY and HAVING clauses are explained and demonstrated for summarizing data based on groups, along with aggregate functions like COUNT, SUM, AVG, MAX, and MIN.
    • Joining Tables: The concept of joining data from multiple tables is introduced, with a focus on INNER JOIN and the importance of common fields for linking tables.
    • Advanced SQL Concepts: The sources delve into more advanced topics such as subqueries (nested queries), views (virtual tables), stored procedures (reusable SQL code), triggers (actions performed automatically in response to database events), Common Table Expressions (CTEs/WITH expressions), and window functions (for analytical queries).
    • SQL Functions: Various built-in SQL functions are explained and demonstrated, including mathematical functions (ABS, GREATEST, LEAST, MOD, POWER, SQRT, SIN, COS, TAN, CEILING, FLOOR) and string functions (CHARACTER_LENGTH, CONCAT, LEFT, RIGHT, SUBSTRING/MID, REPEAT, REVERSE, LTRIM, RTRIM, TRIM, POSITION, ASCII).
    • Practical Application and Examples: The sources heavily rely on practical examples and demonstrations within MySQL Workbench and online PostgreSQL environments to illustrate the usage and benefits of different SQL concepts and commands.
    • Database Connectivity with Python: One source provides a basic introduction to connecting to a MySQL database using Python, creating databases and tables, inserting data, and executing queries.
    • Common Interview Questions: One section focuses on typical SQL interview questions, covering topics like INDEX, GROUP BY, ALIAS, ORDER BY, differences between WHERE and HAVING, VIEW, and STORED PROCEDURE.

    Most Important Ideas and Facts (with Quotes):

    • SQL Clauses for Data Manipulation:“we condition one condition two and so on then we have the group by Clause that takes various column names so you can write Group by column 1 column 2 and so on next we have the having Clause to filter out tables based on groups finally we have the order by Clause to filter out the result in ascending or descending order” (01.pdf) – This outlines the basic structure and purpose of key SQL clauses.
    • The WHERE clause filters rows before grouping, while the HAVING clause filters groups after they are formed.
    • SQL Data Types: The document lists various SQL data types, categorizing them as exact numeric (integer, small int, bit, decimal), approximate numeric (float, real), date and time (date, time, timestamp), string (char, varchar, text), and binary (binary, varbinary, image).
    • SQL Operators: Basic arithmetic, logical (all, and, any, or, between, exists), and comparison operators (=, !=, >, <, >=, <=, NOT <, NOT >) are fundamental for constructing SQL queries.
    • MySQL Workbench Installation: The source provides a step-by-step guide to installing MySQL Workbench on Windows, including downloading the installer from the official Oracle website (myql.com), choosing a custom setup, and selecting components like MySQL Server, MySQL Shell, and MySQL Workbench. The importance of setting a password for the root user is emphasized: “now here set the password for your root user by the way root is the default user this user will have access to everything” (01.pdf).
    • Basic MySQL Commands: Commands like SHOW DATABASES, USE <database_name>, SHOW TABLES, SELECT * FROM <table_name>, and DESCRIBE <table_name> are introduced as essential for navigating and inspecting database structures.
    • Creating Tables: The CREATE TABLE command syntax is explained, including defining column names and their data types, and specifying constraints like PRIMARY KEY and NOT NULL.
    • Inserting Data: The INSERT INTO command is used to add new rows into a table, specifying the table name and the values for each column.
    • String Functions:“there’s also a function called position in MySQL the position function Returns the position of the first occurrence of a substring in a string” (01.pdf)
    • “the asky function Returns the asky value for a specific character” (01.pdf)
    • PostgreSQL’s string functions like CHARACTER_LENGTH, CONCAT, LEFT, RIGHT, REPEAT, and REVERSE provide powerful text manipulation capabilities.
    • GROUP BY and Aggregate Functions: The GROUP BY clause groups rows with the same values in specified columns, allowing the application of aggregate functions to each group.
    • HAVING Clause for Filtering Groups: “the having Clause works like the wear Clause the difference is that wear Clause cannot be used with aggregate functions the having Clause is used with a group by Clause to return those rows that meet a condition” (Source 17.pdf).
    • JOIN Operations: SQL joins (INNER JOIN is primarily discussed) are used to combine rows from two or more tables based on related columns.
    • Subqueries (Nested Queries): A subquery is a query embedded within another SQL query, used to retrieve data that will be used in the main query’s conditions.
    • Views (Virtual Tables):“views are actually virtual tables that do not store any data of their own but display data stood in other tables views are created by joining one or more tables” (01.pdf).
    • Views simplify complex queries and can enhance data security. The CREATE VIEW, RENAME TABLE (for renaming views), and DROP VIEW commands are used to manage views.
    • Stored Procedures:“a stored procedure is an SQL code that you can save so that the code can be reused over and over again” (01.pdf).
    • Stored procedures can take input parameters (IN parameters) and help in encapsulating and reusing SQL logic.
    • Triggers: Triggers are SQL code that automatically executes in response to certain events (e.g., BEFORE INSERT, AFTER UPDATE) on a table.
    • Window Functions: Introduced in MySQL 8.0, window functions perform calculations across a set of table rows that are related to the current row, allowing for analytical queries (e.g., calculating total salary per department using SUM() OVER (PARTITION BY)). The RANK(), DENSE_RANK(), and FIRST_VALUE() functions are examples of window functions.
    • Common Table Expressions (CTEs): CTEs, defined using the WITH keyword, are temporary, named result sets defined within the scope of a single query, improving readability and allowing for recursive queries.
    • Database Connectivity with Python: The mysql.connector library in Python can be used to connect to MySQL databases, execute SQL queries, and retrieve results. The basic steps involve creating a server connection, creating databases, connecting to specific databases, and executing queries using cursors.
    • PostgreSQL Specifics: The sources also demonstrate SQL concepts within a PostgreSQL environment using online compilers, highlighting similar SQL syntax and the availability of functions like BETWEEN, LIKE for pattern matching (% for any sequence of characters, _ for a single character), and various mathematical and string functions. The ALTER TABLE … RENAME COLUMN command is shown for modifying table schema. The LIMIT clause in PostgreSQL restricts the number of rows returned by a query.
    • SQL Interview Preparedness: The final source provides insights into common SQL interview questions, emphasizing understanding of fundamental concepts and practical application.

    Overall Significance:

    The provided sources offer a comprehensive introduction to fundamental and advanced SQL concepts, demonstrating their application in both MySQL and PostgreSQL. They emphasize practical learning through examples and hands-on exercises, making them valuable resources for individuals learning SQL or preparing for database-related tasks and interviews. The inclusion of database connectivity with Python further highlights the role of SQL in broader data management and application development contexts.

    Understanding Fundamental SQL Concepts and Operations

    1. What are the fundamental components of a SQL query?

    A fundamental SQL query typically involves the SELECT statement to specify the columns you want to retrieve, the FROM clause to indicate the table(s) you are querying, and optionally, the WHERE clause to filter rows based on specific conditions. Additionally, you might use GROUP BY to group rows with the same values, HAVING to filter groups, and ORDER BY to sort the result set in ascending (ASC) or descending (DESC) order.

    2. What are the common data types available in SQL?

    SQL supports various data types to define the kind of data a column can hold. These include exact numeric types like INT, SMALLINT, BIT, and DECIMAL; approximate numeric types such as FLOAT and REAL; date and time types like DATE, DATETIME, and TIMESTAMP; string data types including CHAR, VARCHAR, and TEXT; and binary data types such as BINARY, VARBINARY, and IMAGE.

    3. What are the different categories of operators used in SQL?

    SQL uses several categories of operators. Arithmetic operators perform mathematical operations (+, -, *, /, MOD). Logical operators (ALL, ANY, OR, BETWEEN, EXISTS, etc.) are used to combine or negate conditions. Comparison operators (=, !=, >, <, >=, <=, NOT <, NOT >) are used to compare values.

    4. How can you set up and connect to a MySQL database using MySQL Workbench and the command line?

    To set up MySQL, you typically download the MySQL Installer from the official Oracle website. During the installation, you can choose to install MySQL Server, MySQL Shell, and MySQL Workbench. You’ll need to configure the server instance, set a password for the root user, and execute the configuration.

    To connect via MySQL Workbench, you open the application, click on the local instance connection, and enter your root password.

    To connect via the command line, you need to navigate to the bin directory of your MySQL installation using the cd command in the command prompt. Then, you can use the command mysql -u root -p, and upon entering your password, you’ll be connected to the MySQL server.

    5. What are some basic SQL commands for database and table manipulation?

    Some basic SQL commands include:

    • SHOW DATABASES; to list the existing databases.
    • USE database_name; to select a specific database to work with.
    • SHOW TABLES; to list the tables within the selected database.
    • SELECT * FROM table_name; to view all rows and columns in a table.
    • DESCRIBE table_name; or DESC table_name; to show the structure of a table (column names, data types, etc.).
    • CREATE DATABASE database_name; to create a new database.
    • CREATE TABLE table_name (column1 datatype, column2 datatype, …); to create a new table with specified columns and data types.
    • DROP TABLE table_name; to delete a table.
    • DROP DATABASE database_name; to delete a database.

    6. How do GROUP BY and HAVING clauses work in SQL?

    The GROUP BY clause in SQL is used to group rows in a table that have the same values in one or more columns into summary rows. It is often used with aggregate functions (like COUNT, MAX, MIN, AVG, SUM) to compute values for each group.

    The HAVING clause is used to filter the results of a GROUP BY clause. It allows you to specify conditions that must be met by the groups. The key difference from the WHERE clause is that WHERE filters individual rows before grouping, while HAVING filters groups after they have been formed.

    7. What are SQL JOINs and what are some common types?

    SQL JOINs are used to combine rows from two or more tables based on a related column between them. This allows you to retrieve data from multiple tables in a single query. Common types of JOINs include:

    • INNER JOIN: Returns rows only when there is a match in both tables.
    • LEFT JOIN (or LEFT OUTER JOIN): Returns all rows from the left table and the matching rows from the right table. If there’s no match in the right table, NULLs are used for the right table’s columns.
    • RIGHT JOIN (or RIGHT OUTER JOIN): Returns all rows from the right table and the matching rows from the left table. If there’s no match in the left table, NULLs are used for the left table’s columns.
    • FULL OUTER JOIN: Returns all rows when there is a match in either the left or right table. If there is no match in one of the tables, NULLs are used for the columns of the table without a match. (Note: MySQL does not directly support FULL OUTER JOIN, but it can be simulated using UNION ALL with LEFT JOIN and RIGHT JOIN).

    JOIN conditions are typically specified using the ON keyword, indicating which columns should be compared for equality.

    8. What are subqueries and stored procedures in SQL?

    A subquery (or inner query) is a query nested inside another SQL query. Subqueries can be used in the SELECT, FROM, WHERE, and HAVING clauses. They are often used to retrieve data that will be used in the conditions or selections of the outer query. Subqueries can return single values, lists of values, or even entire tables.

    A stored procedure is a set of SQL statements with an assigned name, which is stored in the database. Stored procedures can be executed by calling their name. They offer several benefits, such as code reusability, improved performance (as the code is pre-compiled and stored on the server), and enhanced security by granting execute permissions without direct table access. Stored procedures can also accept input parameters and return output parameters.

    Understanding Relational Database Tables

    In relational databases, data is stored in the form of tables. These tables are the fundamental structure for organizing and managing data. You can think of a table as a grid composed of rows and columns.

    Here’s a breakdown of the structure of a database table:

    • Table Name: Each table has a name that identifies the data it holds, for example, “players”, “employees”, “customers”, or “orders”.
    • Columns (or Fields or Attributes):
    • Columns are the vertical structures in a table.
    • Each column represents a specific attribute or category of information about the items stored in the table.
    • At the top of each column is a column name (also known as a field name) that describes the data in that column, such as “player ID”, “player name”, “country”, and “goals scored” in a “players” table. Other examples include “employee_ID”, “employee_name”, “age”, “gender”, “date of join”, “department”, “city”, and “salary” in an “employees” table.
    • Each column is associated with a specific data type that defines the kind of values it can hold. Examples of data types in SQL include integer, smallint, decimal, float, real, date, time, varchar, char, text, binary, etc.. The data type ensures that all values stored in a specific column are of the same type or domain.
    • Columns are also sometimes referred to as fields in a database.
    • Rows (or Records or Tuples):
    • Rows are the horizontal structures in a table.
    • Each row represents a single instance or record (also called a tuple) of the entity that the table describes.
    • For example, in a “players” table, each row would contain the information for one specific player. In an “employees” table, each row would contain the details of a single employee.
    • Cells: The intersection of a row and a column forms a cell, which holds a single piece of data. Each column in a row will contain only one value per row, which is a rule for the first normal form of normalization.
    • Primary Key: A primary key is a special column or a set of columns that uniquely identifies each row in a table. It ensures that no two rows have the same primary key value, and it cannot contain null or empty values. Primary keys are crucial for linking tables together and maintaining data integrity. For instance, “employee_ID” could serve as a primary key in an “employees” table.
    • Index: Tables can be indexed on one or more columns to speed up the process of finding relevant information. An index creates a sorted structure that allows the database to locate specific rows more efficiently without having to scan the entire table.

    SQL (Structured Query Language) commands are used to interact with these tables. You can use SQL to query (retrieve), update, insert, and delete records in a table. The SELECT statement is used to retrieve data by specifying the columns you want to see and optionally filtering the rows based on certain conditions using the WHERE clause. INSERT is used to add new rows to a table, UPDATE to modify existing rows, and DELETE to remove rows.

    The logical structure of a database, including its tables and their relationships, can be visually represented using an Entity-Relationship (ER) diagram. An ER diagram shows entities (which often correspond to tables) and their attributes (which correspond to columns) and the relationships between these entities. This helps in understanding the information to be stored in a database and serves as a blueprint for database design.

    Understanding SQL: Core Concepts and Commands

    SQL (Structured Query Language) is a domain-specific language that serves as the backbone of data management and analysis for relational databases. It is the standard language used by most databases to communicate with and manipulate data. Initially developed by IBM, SQL allows users to interact with databases to store, process, analyze, and manage data effectively. As businesses become increasingly data-driven, proficiency in SQL is a crucial skill for data analysts, developers, and database administrators.

    Here are key aspects of the SQL query language based on the sources:

    • Core Functionality: SQL queries enable you to access any information stored in a relational database. This includes retrieving specific data, updating existing records, inserting new data, and deleting unwanted information.
    • Efficiency: SQL is designed to extract data from databases in a very efficient way. By specifying precisely what data you need and the conditions it must meet, you can minimize the amount of data processed and transferred.
    • Compatibility: The Structured Query Language is compatible with all major database systems, ranging from Oracle and IBM to Microsoft SQL Server and open-source options like MySQL and PostgreSQL.
    • Ease of Use: SQL is designed to manage databases without requiring extensive coding. Its syntax is relatively straightforward, focusing on declarative statements that specify what data should be retrieved or modified, rather than how to perform the operation.
    • Applications of SQL: SQL has a wide range of applications, including:
    • Creating databases and defining their structure (e.g., creating tables with specific columns and data types).
    • Implementing and maintaining existing databases.
    • Entering, modifying, and extracting data within a database. For instance, you can use INSERT to add new records, UPDATE to change existing ones, and SELECT to retrieve data.
    • Serving as a client-server language to connect the front-end of applications with the back-end databases that store the application’s data.
    • Protecting databases from unauthorized access when deployed as Data Control Language (DCL).
    • Types of SQL Commands: SQL commands are broadly categorized into four main types:
    • Data Definition Language (DDL): These commands are used to change the structure of the database objects such as tables. Examples include CREATE (to create tables), ALTER (to modify table structure), DROP (to delete tables), and TRUNCATE (to remove all rows from a table). DDL commands are auto-committed, meaning changes are permanently saved.
    • Data Manipulation Language (DML): These commands are used to modify the data within the database. Examples include SELECT (to retrieve data), INSERT (to add new rows), UPDATE (to modify existing rows), and DELETE (to remove rows). DML commands are not auto-committed, allowing for rollback of changes. The SELECT command is also referred to as Data Query Language (DQL).
    • Data Control Language (DCL): These commands control access to data within the database, managing user privileges and permissions. Examples include GRANT (to give users access rights) and REVOKE (to remove access rights).
    • Transaction Control Language (TCL): These commands manage database transactions. Examples include COMMIT (to save changes permanently) and ROLLBACK (to undo changes).
    • Basic SQL Command Structure: A typical SQL query follows a basic structure:
    • SELECT column1, column2, …
    • FROM table_name
    • WHERE condition(s)
    • GROUP BY column(s)
    • HAVING group_condition(s)
    • ORDER BY column(s) ASC|DESC;
    • The SELECT statement specifies the columns you want to retrieve. You can use SELECT * to select all columns.
    • The FROM statement indicates the table from which to retrieve the data.
    • The optional WHERE clause filters rows based on specified conditions. You can use comparison operators (e.g., >, =, <), logical operators (AND, OR, NOT), BETWEEN to select within a range, and IN to specify multiple values.
    • The optional GROUP BY clause groups rows that have the same values in one or more columns into summary rows, often used with aggregate functions.
    • The optional HAVING clause filters groups based on specified conditions (used with GROUP BY).
    • The optional ORDER BY clause sorts the result set in ascending (ASC) or descending (DESC) order based on one or more columns.
    • Data Types: SQL supports various data types to define the kind of data each column can hold, including exact numeric (integer, smallint, decimal), approximate numeric (float, real), date and time (date, time, timestamp), string (char, varchar, text), and binary data types (binary, varbinary, image).
    • Operators: SQL uses different types of operators to perform operations in queries, such as arithmetic operators (+, -, *, /), logical operators (ALL, ANY, BETWEEN, EXISTS, IN, LIKE, NOT, OR), and comparison operators (=, !=, >, <, >=, <=).
    • Functions: SQL provides built-in functions to perform various operations on data, including:
    • Aggregate functions: Calculate a single value from a set of rows (e.g., COUNT, SUM, AVG, MIN, MAX).
    • String functions: Manipulate text data (e.g., LENGTH, UPPER, LOWER, SUBSTRING, CONCAT, TRIM, POSITION, LEFT, RIGHT, REPEAT, REVERSE).
    • Date and time functions: Work with date and time values (e.g., CURDATE, DAY, NOW).
    • Mathematical functions: Perform mathematical calculations (e.g., ABS, GREATEST, LEAST, ROUND).
    • Joins: SQL allows you to combine data from two or more tables based on a related column. Different types of joins include INNER JOIN (returns rows only when there is a match in both tables), LEFT JOIN (returns all rows from the left table and matching rows from the right), RIGHT JOIN (returns all rows from the right table and matching rows from the left), and FULL OUTER JOIN (returns all rows when there is a match in either left or right table). UNION operator can also be used to combine the result sets of two or more SELECT statements.
    • Subqueries: A subquery (or inner query) is a query nested inside another SQL query. Subqueries can be used in the WHERE, SELECT, and FROM clauses to retrieve data that will be used by the outer query.
    • Stored Procedures: These are pre-compiled SQL statements that can be executed as a single unit. They can take parameters and return values, helping to encapsulate business logic and improve performance.
    • Triggers: Triggers are special types of stored procedures that automatically run when a specific event occurs in the database server (e.g., before or after an INSERT, UPDATE, or DELETE operation on a table).

    In summary, SQL is a powerful and versatile language essential for interacting with relational databases. It provides a structured way to define, manipulate, and retrieve data, making it a cornerstone of modern data management and analysis.

    Essential Skills for Aspiring Data Analysts

    Based on the sources, becoming a data analyst requires a combination of technical and soft skills. The document “01.pdf” outlines several key skill areas for aspiring data analysts.

    According to the source, the steps to become a data analyst include focusing on skills as the first crucial step. These skills are categorized into six main areas:

    • Microsoft Excel Proficiency: While advanced tools exist, proficiency in Excel remains vital for data analysts. Its versatility in data manipulation, visualization, and modeling is unmatched, making it a foundational tool for initial data exploration and basic analysis.
    • Data Management and Database Management Skills: This is indispensable for data analysts as the volume of data grows. Efficient management and retrieval from databases are critical. Proficiency in DBMS systems and querying languages like SQL ensures analysts can access and manipulate data seamlessly. As we discussed previously, SQL is the backbone of data management and analysis. It allows data analysts to access any information stored in a relational database with SQL queries. This includes writing queries, joining tables, and using subqueries.
    • Statistical Analysis: This skill allows analysts to uncover hidden trends, patterns, and correlations within data, facilitating evidence-based decision-making. It empowers analysts to identify the significance of findings, validate hypotheses, and make reliable predictions.
    • Programming Languages (e.g., Python, R): Proficiency in programming languages like Python is essential for data analysis. These languages enable data manipulation, advanced statistical analysis, and machine learning implementations. The source also mentions R programming language as one of the tools a data analyst should be familiar with.
    • Data Storytelling and Data Visualization: This skill is paramount for data analysts. Data storytelling bridges the gap between data analysis and actionable insights, ensuring that the value of data is fully realized. The ability to present insights clearly and persuasively is crucial as data complexity grows. Tools like Tableau and Power BI are mentioned as data visualization tools.
    • Problem Solving and Soft Skills: Strong problem-solving skills are important for data analysts when dealing with complex data challenges and evolving analytical methodologies. Analysts must excel in identifying issues, formulating hypotheses, and devising innovative solutions. In addition to technical skills, data analysts in 2025 will require strong soft skills to excel. These include:
    • Communication: Data analysts must effectively communicate their findings to both technical and non-technical stakeholders, presenting complex data in a clear and understandable manner.
    • Teamwork and Collaboration: Data analysts often work with multidisciplinary teams alongside data scientists, data engineers, and business professionals. Collaborative skills are essential for sharing insights, brainstorming solutions, and working cohesively towards common goals.
    • Domain Knowledge: Knowledge of the domain in which the analyst is working (e.g., pharmaceutical, banking, automotive) is really important. Without a basic foundational domain knowledge, it can be difficult to provide accurate results.

    In summary, a data analyst needs a blend of technical skills in data manipulation (including SQL and Excel), statistical analysis, programming, and data visualization, along with crucial soft skills in communication, teamwork, and problem-solving, complemented by domain knowledge. Our earlier discussions highlight the fundamental role of SQL in a data analyst’s toolkit for interacting with databases [1, Your previous turn].

    Understanding Database Management and SQL

    Based on the sources, database management encompasses the organized collection of structured information or data, typically stored electronically in a computer system. This data is managed using a Database Management System (DBMS), which acts as a storage system for the collection of data.

    Here are key aspects of database management as discussed in the sources:

    • Role of a DBMS: A DBMS is crucial for controlling and managing databases. It provides the necessary tools and functionalities to ensure data is easily retrieved, managed, and updated.
    • Relational Databases: A significant aspect of database management discussed in the source is relational databases. These systems store data in the form of tables. This tabular structure allows for organizing data into tables, rows (records or tuples), and columns (fields).
    • Organization and Indexing: In relational databases, data can be organized into tables with specific structures. Furthermore, data can be indexed to make it easier to find relevant information. An index helps speed up data retrieval operations. A table consists of:
    • Column Names (Fields): These are the attributes of the data stored in the table (e.g., player ID, player name, country, goals scored). Each column should have a unique name. All values within a specific column should be of the same data type or domain.
    • Rows (Records or Tuples): Each row represents a single instance of the entity being described by the table (e.g., information about a specific player).
    • SQL for Database Management: As highlighted in our previous conversation, SQL (Structured Query Language) is a domain-specific language used to communicate with databases [1, Your previous turn]. It plays a vital role in database management by allowing users to:
    • Query databases to retrieve specific information.
    • Update databases to modify existing data.
    • Insert records to add new data.
    • Perform many other tasks related to managing and manipulating data.
    • Store, process, analyze, and manipulate databases.
    • Create a database and define its structure.
    • Maintain an already existing database.
    • Popular Databases: The source lists several popular database systems, including:
    • MySQL.
    • Oracle Database.
    • MongoDB (a NoSQL database).
    • Microsoft SQL Server.
    • Apache Cassandra (a free and open-source NoSQL database).
    • PostgreSQL.
    • Database Management Skills for Data Analysts: Our previous discussion on data analyst skills emphasized that data management and database management skills are indispensable for data analysts [Your previous turn, 3]. The increasing volume of data necessitates efficient management and retrieval from databases, making proficiency in DBMS systems and querying languages like SQL critical. Data analysts need to be able to access and manipulate data seamlessly using SQL.

    In essence, database management involves the strategic organization, storage, retrieval, and manipulation of data using a DBMS. Relational databases, structured in tables, are a common model, and SQL is the primary language used to interact with these systems for various management tasks. These skills are fundamental for professionals like data analysts who work with data to derive insights and support decision-making.

    SQL for Data Analysis Functions

    Based on the sources and our conversation history, data analysis functions involve the process of inspecting, cleaning, transforming, and modeling data with the goal of discovering useful information, informing conclusions, and supporting decision-making. SQL plays a crucial role in performing many of these functions when the data resides in relational databases [1, Your previous turn, Your previous turn].

    Here are some key data analysis functions that can be performed using SQL, as supported by the sources:

    • Data Retrieval and Selection: SQL’s SELECT statement is fundamental for retrieving specific data required for analysis. You can choose particular columns from one or more tables. For example, to analyze player performance, you might select player name and goals scored from a players table.
    • Filtering Data: To focus on relevant subsets of data, the WHERE clause in SQL allows you to filter records based on specified conditions. For instance, you might analyze data only for players from a specific country.
    • Sorting Data: The ORDER BY clause enables you to sort the retrieved data based on one or more columns, which can help in identifying trends or outliers. You could sort players by the number of goals scored in descending order to see the top performers.
    • Removing Duplicates: The DISTINCT keyword is used to retrieve only unique values from a column, which can be important for accurate analysis, such as finding the number of unique cities represented in a dataset.
    • Aggregation: SQL provides aggregate functions that perform calculations on a set of rows and return a single summary value. These are essential for summarizing data:
    • COUNT(): To count the number of rows or non-null values. For example, counting the total number of employees.
    • SUM(): To calculate the total sum of values in a column. For example, finding the total salary of all employees.
    • AVG(): To calculate the average of values in a column. For example, finding the average age of employees.
    • MIN(): To find the minimum value in a column. For example, identifying the lowest salary.
    • MAX(): To find the maximum value in a column. For example, determining the highest salary.
    • Grouping Data: The GROUP BY clause allows you to group rows that have the same values in one or more columns into summary rows. This is often used in conjunction with aggregate functions to perform analysis on different categories. For instance, finding the average salary for each department.
    • Filtering Groups: The HAVING clause is used to filter groups created by the GROUP BY clause based on specified conditions, often involving aggregate functions. For example, identifying countries where the average salary is greater than a certain threshold.
    • Joining Tables: When data for analysis is spread across multiple related tables, JOIN operations in SQL are used to combine data from these tables based on common columns. This allows you to bring together relevant information for a comprehensive analysis, such as combining customer information with their order details. As mentioned in the source, you can even join three or more tables.
    • Using Inbuilt Functions: SQL provides various inbuilt functions that can be used for data manipulation and analysis. These include:
    • Mathematical Functions: For performing calculations (e.g., ABS(), MOD(), SQRT(), POWER()).
    • String Functions: For manipulating text data (e.g., LENGTH(), CONCAT(), UPPER(), LOWER(), SUBSTRING(), REPLACE()).
    • Date and Time Functions: For working with temporal data (e.g., CURRENT_DATE(), NOW(), extracting day, year).
    • Creating Calculated Fields: Using SQL, you can create new columns based on existing data through calculations or conditional logic. The CASE statement allows you to define different values for a new column based on conditions evaluated on other columns, enabling the categorization of data (e.g., creating a salary range category based on salary values).
    • Subqueries (Nested Queries): SQL allows you to write queries within other queries, which can be used to perform more complex data retrieval and analysis. For example, selecting employees whose salary is greater than the average salary calculated by a subquery.
    • Views: Views are virtual tables based on the result of an SQL statement. They can simplify complex queries and provide a focused perspective on the data, making analysis easier by presenting a subset of data in a more manageable format.
    • Common Table Expressions (CTEs): CTEs are temporary, named result sets defined within the scope of a single query. They can break down complex analytical queries into smaller, more readable, and manageable parts.

    These data analysis functions, facilitated by SQL, are crucial skills for a data analyst, as highlighted in our earlier discussion about the necessary skills for this role [Your previous turn]. Proficiency in using these SQL features allows data analysts to effectively extract, manipulate, summarize, and analyze data stored in databases to derive meaningful insights.

    SQL Full Course 2025 | SQL Tutorial for Beginners | SQL Beginner to Advanced Training | Simplilearn

    The Original Text

    hello everyone and welcome to SQL fos by simply learn have you ever wondered how apps manage data or how businesses handle massive data sets the answer lies in SQL structured query language is the backbone of data management and Analysis making it a must have skill for data analyst developers and database administrators as well as IND indes become more datadriven the demand for SQL experts is skyrocketed and by 2025 job opportunities in fields like SQL development and data analysis with search with starting salaries reaching around $50,000 in the US and around 4 to8 lakh perom in India and even experienced professionals earn around $100,000 or 20 lakh perom in India this course will take you from a beginner level to see SQL expert you learn how to write queries join tables use subqueries and apply SQL for Hands-On data analysis and by the end you’ll be equipped to manage and manipulate data like a pro so let’s get started but before that if you’re interested to make a current data analytics check out Simply learn’s postgraduate program in data analytics this comprehensive course is designed to transform you into a data analyst export this program covers essential skills such as data visualization statistical analysis machine learning using industry leading tools and Technologies like XLR Python and even tablet the course link is mentioned in description box below and in the pin comment so hurry up and enroll now in this session we are going to learn about databases how data is stored in relational databases and we’ll also look at some of the popular databases finally we’ll understand various SQL commands on my SQL Server now let’s get started with what is a database so according to Oracle a database is an organized collection of structured information or data that is typically stored electronically in a computer system a database is usually controlled by a database management system or dbms so it is a storage system that has a collection of data relational databases store data in the form of tables that can be easily retrieved managed and updated you can organize data into tables rows columns and index it to make it easier to find relevant information now talking about some of the popular databases we have mySQL database we also have Oracle database then we have mongod DV which is a no SQL database next we have Microsoft SQL Server next we have Apache cassendra which is a free and open source nosql database and finally we have postgress SQL now let’s learn what is SQL so SQL is a domain specific language to communicate with databases SQL was initially developed by IBM most databases use structured query language or SQL for writing and querying data SQL commands help you to store process analyze and manipulate databases with this let’s look at what a table is so this is how a table in a database looks like so here you can see the name of the table is players on the top you can see the column names so we have the player ID the player name the country to which the player belongs to and we also have the goals scored by each of the players so these are also known as fields in a database here each row represents a record or a tle so if you have the player ID which is 103 here the name of the player is Daniel he is from England and the number of goals he has scored is seven so you can use SQL commands to query update insert records and do a lot of other tasks now we’ll see what the features of SQL are SQL lets you access any information stored in a relational database with SQL queries data is extracted from the database in a very efficient way the structured query language is compatible with all database systems from Oracle IBM to Microsoft and it doesn’t require much coding to manage databases now we will see applications of SQL SQL is used to create a database Define its structure implement it and let you perform many functions SQL is also used for maintaining an already existing database SQL is a powerful language for entering data modifying data and extracting data in a database SQL is extensively used as a client server language to connect the front end with the back end the supporting the client server architecture SQL when deployed as data control language DCL helps protect your database from unauthorized access if you categor the steps to become a data analyst these are the ones firstly you need to focus on skills followed by that you need to have a proper qualification then test your skills by creating a personal project an individual project followed by that you must focus on building your own portfolio to describe your caliber to your recruiters and then Target to the entry level jobs or internships to get exposure to the real world data problems so these are the five important steps now let’s begin with the step one that is skills so skills are basically categorized into six steps Ed cleaning data analysis data visualization problem solving soft skills and domain knowledge so these are the tools Excel MySQL our programming language Python programming language some data visualization tools like TBL Loop powerbi and next comes the problem solving so these are basically the soft skill Parts problem solving skills domain knowledge the domain in which you’re working maybe a farma domain maybe a banking sector maybe automobile domain Etc and lastly you need to be a good team player so that you can actively work along with the team and solve the problem collaboratively now let’s move ahead and discuss each and every one of these in a bit more detail starting with Microsoft Excel while Advanced tools are prevalent Proficiency in Excel remains vital for data analyst Excel versatility in data manipulation visualization and modeling is Unown Managed IT serves as a foundational tool for initial data exploration and basic analysis data management database management skill is indispensable for data analyst as data volume saw efficient management and retrieval from datab basis is critical Proficiency in ddb systems and querying languages like SQL ensures analyst can access and manipulate data seamlessly followed by that we have statistical analysis statistical analysis allow analyst to uncover hidden Trends pattern and cor relationships within data facilitating evidence-based decision making it empowers analyst to identify the significance of findings validate hypothesis and make reliable predictions next after that we have programming languages Proficiency in programming languages like python is essential for data analysis these languages enable data manipulation Advanced statistical analysis and machine learning implementations next comes data storytelling or also known known as data visualizations data storytelling skill is Paramon for data analyst data storytelling Bridges the gap between data analysis and actionable insights ensuring that the value of data is fully realized in a world where data driven communication is Central to business success data visualization skill is a CornerStore for data analyst as data complexity grows the ability to present insights clearly and persuasively is Paramount next is managing your customers and problem solving managing all your customers data and Company relationships is Paramount strong problem solving skills are important for data analyst with complex data challenges and evolving analytical methodologies analyst must excel in identifying issues formulating hypothesis and devising innovative solutions in addition to the technical skills data analyst in 2025 will require strong soft skills to excel in their roles here are the top ones data analyst must effectively communicate their findings to both Technical and non-technical stakeholders this includes presenting complex data in a clear and understandable manner next soft skill is teamwork and collaboration data analysts often work with multidisciplinary teams alongside data scientists data Engineers business professionals collaborative skills are essential for sharing insights brainstorming Solutions and working cohesively towards common goals and last but not least domain knowledge knowledge on domain in which you’re currently working is really important it might be a formatical domain it can be an automobile domain it can be banking sector and much more unless you have a basic foundational domain knowledge you cannot continue in that domain with accurate results now the next step which was about the qualification to become a data analyst Master’s courses online courses and boot camps provide strong structured learning that helps you gain in-depth knowledge and specialized skills in data analysis masters programs offer comprehensive academically recr training and often include research projects making sure you’re highly competitive in the job market online courses allow flexibility to learn at your own pace while covering essential topics and boot gaps offer immersive Hands-On training in a short period focusing on practical skills all three parts enhance your credibility keeping you updated on industry Trends and make you more attractive to potential employers if you are looking for a well curated allrounder then we have got you covered simply learn offers a wide range of courses on data science and data analytics starting from Masters professional certifications to post graduations and boot camps from globally reputed and recognized universities for more details check out the links in the description box below and comment section now proceeding ahead we have the projects for data analyst data analyst this projects demonstrate practical skills in data cleaning visualization and Analysis they help build a portfolio showcasing your expertise and problem solving abilities projects provide hands-on experience Bridging the Gap between Theory and real world application this show domain knowledge making you more appealing to employees in specific Industries projects enhance your confidence and prepare you to discuss real world challenges in interviews proceeding ahead the next step is about the portfolio for data analysts a portfolio is a testament that demonstrates your skill and expertise through real world projects showcasing your ability to analyze and interpret data effectively it provides tangible proof of your capabilities making you stand out to the employers additionally it highlights your domain knowledge and problem solving skills giving you a Competitive Edge during job applications and interviews last but not the least data analyst internships internships provide hands-on experience with real world sets tools and workflows Bridging the Gap between Theory knowledge and practical application they offer exposure to Industry practices helping you understand how data is used to drive decisions internships also build you Professional Network enhance your resuming and improve chances of securing a full-time data analy role so let’s understand what 10 year diagram is an entity relationship diagram describes the relationship of entities that needs to to be stored in a database ER diagram is mainly a structural design for the database it is a framework made using specializ symbols to define the relationship between entities ER diagrams are created based on the three main components entities attributes and relationships let’s understand the use of ER diagram with the help of a real world example here a school needs all its Student Records to be stored digitally so they approach an IT company to do so a person from the company will meet the school authorities note all their requirements describe them in the form of ear diagram and get it cross checked by the school authorities as the school authorities approve the year diagram the database Engineers would carry further implementation let’s have a view of an ear diagram the following diagram showcases two entities student and course and the relationship the relationship described between student and course is many to many as a course can be opted by several students and a student can opt for more than one course here student is the entity and it processes the attributes that is student ID student name and student age and the course entity has attributes such as course ID and course name now we have an understanding of Y diagram let us see why it has been so popular The Logical structure of the database provided by a diagram communicates the landscape of business to different teams in the company which is eventually needed to support the business year diagram is a GUI representation of The Logical structure of a database which gives a better understanding of the information to be stored in a database database designers can use ER diagrams as a blueprint which reduces complexity and helps them save time to build databases quickly ear diagrams helps you identify the enti ities that exist in a system and the relationships between those entities after knowing its uses now we should get familiar with the symbols used in your diagram the rectangle symbol represents the entities oral symbol represents attributes a rectangle embedded in a rectangle represents a weak entity a dashed toal represents a derived attribute a diamond symbol represents a relationship among entities double all symbol represents multivalued attributes now we should dive in and learn about the components of ER diagram there are three main components of ER diagram entity attribute and relationship entities have weak entity attributes are further classified into key attribute composite attribute multivalued attribute and derived attribute relationships are also classified into one to one relationships one to many relationships many to one relationships and many to many relationships let’s understand these components of V diagram starting with entities an entity can be either a living or a non- living component an entity is showcased as a rectangle in a near diagram let’s understand this with the help of a near diagram here both student and course are in rectangular shape and are called entities and they represent the relationship study in a diamond shape let’s transition to weak entity and an entity that makes Reliance over another entity is called a weak entity the weak entity is showcased as a double rectangle in ER diagram in the example below the school is a strong entity because it has a primary key attribute School number unlike the school the classroom is a weak entity because it does not have any primary key and the room number attribute here acts only as a discriminator and not a primary key now let us know about attributes attribute an attribute exhibits the properties of an entity an attribute is Illustrated with an oval shape in an ER diagram in the example below student is an entity and the properties of student such as address age name and role number are called its attributes let’s see our first classification under attribute that is key attribute the key attribute uniquely identifies an entity from an entity set the text of a key attribute is underlined in the example below we have a student entity and it has attributes name address role number and age but here role number can uniquely identify a student from a set of students that’s why it is termed as a key attribute now we will see composite attribute an attribute that is composed of several other attributes is known as a composite attribute and oval showcases the composite attribute and the composite attribute oval is further connected with other ovals in the example below we can see an attribute name which can have further subparts such as first name middle name and last name these attributes with further classification is known as composite attribute now let’s have a look at multivalued attribute an attribute that can possess more than one value are called multivalued attributes these are represented as double old shape in the example below the student entity has attributes phone number role number name and age out of these attributes phone number can have more than one entry and the attribute with more than one value is called multivalued attribute let’s see derived attribute an attribute that can be derived from other attributes of the entity is known as a derived attribute in the ER diagram the derived attribute is represented by dashed over and in the example below student entity has both date of birth and age as attributes here age is a derived attribute as it can be derived by subtracting current date from the student date of birth now after knowing attributes let’s understand relationship in ER diagram a relationship is showcased by the diamond shape in the year diagram it depicts the relationship between two entities in the below for example student study course here both student and course are entities and study is the relationship between them now let’s go through the type of relationship first is one to one relationship when a single element of an entity is associated with a single element of another entity this is called one to one relationship in the example below we have student and identification card as entities we can see a student has only one identification card and an identification card is given to one student it represents a one to one relationship let’s see the second one one to many relationship when a single element of an entity is associated with more than one element of another entity is called one to many relationship in the below example a customer can place many orders but a particular order cannot be placed by many customers now we will have a look at many to one relationship when more than one element of an entity is related to a single element of another entity it is called many to one relationship for example students have to opt for a single course but a course can be opted by number of students let’s see many to many relationship when more than one element of an entity is associated with more than one element of another entity is called many to many relationship for example an employee can be assigned to many projects and many employees can be assigned to a particular project now after having an understanding of ER diagram let us know the points to keep in mind while creating the year diagram first identify all the entities in the system embed all the entities in a rectangular shape and label them appropriately this could be a customer a manager an order an invoice a schedule Etc identify relationships between entities and connect them using a diamond in the middle illustrating the relationship do not connect relationships connect attributes with entities and label them appropriately and the attribute should be in Old shape assure that each entity only appears a single time and eradicate any redundant entities or relationships in the ear diagram make sure your ER diagram supports all the data provided to design the database make effective use of colors to highlight key areas in your diagrams there are mainly four types of SQL commands so first we have data definition language or ddl so ddl commands change the structure of the table like creating a table deleting a table or altering a table all the commands of ddl are autoc committed which means it permanently save all the changes in the database we have create alter drop and truncate as ddl commands next we have data manipulation language or DML so DML commands are used to modify a database it is responsible for all forms of changes in the database DML commands are not autoc committed which means it can’t permanently save all the changes in the database we have select update delete and insert as DML commands now select command is also referred to as dql or data query language third we have data control language or DCL so DCL commands allow you to control access to data within the database these DCL commands are normally used to create objects related to user access and also control the distribution of privileges among users so we have Grant and revok which are the examples of data control language finally we have something called as transaction control language or TCL so TCL commands allow the user to manage database transactions commit and roll back our example of TCL now let’s see the basic SQL command structure so first we have the select state stat M so here you specify the various column names that you want to fetch from the table we write the table name using the from statement next we have the we Clause to filter out our table based on some conditions so you can see here we condition one condition two and so on then we have the group by Clause that takes various column names so you can write Group by column 1 column 2 and so on next we have the having Clause to filter out tables based on groups finally we have the order by Clause to filter out the result in ascending or descending order now talking about the various data types in SQL so we have exact numeric which has integer small int bit and decimal then we have approximate numeric which are float and real then we have some date and time data types such as date time time stamp and others then we have string data type which includes car the varar car and text finally we have binary data types and binary data types have binary VAR binary and image now let’s see some of the various operators that are present in SQL so first we have our basic arithmetic operators so you have addition the substraction multiplication division and modulus then we have some logical operators like all and any or between exist and so on finally we have some comparison operators such as equal to not equal to that’s greater than less than greater than equal to or less than equal to not less than or not greater than now let me take you to my MySQL workbench where we will learn to write some of the important SQL commands use different statements functions data types and operators that we just learned in this session we will learn how to install MySQL workbench and then we will run some commands firstly we will visit the official Oracle website that is myql.com and now we’ll move to the downloads page now scroll down and click on my SQL GPL downloads now under Community downloads click on my SQL installer for Windows the current versions are available to download I will choose this installer and click the download button now here just click on no thanks just start my download Once the installer has download it open it you may be prompted for permission click yes this opens the installer we will be asked to choose the setup type we will go with custom click next now you have to select the products you want to install we will install only the MySQL server my SQL shell and the MySQL workbench expand my SQL servers by double clicking on it and choose the version you want to install and click on this Arrow now you have to do the same thing for applications expand applications and choose the MySQL workbench version you want to install and click on the arrow and we’ll do the same thing for my SQL shell we’ll choose the latest version click on the Arrow so these are the products that have to be installed in a system now we will click next I’ll click execute to download and install the server this may take a while depending on your internet speed as the download is completed click next now you see the product configuration click next now we’ll configure our SQL Server instance here we will go with the default settings and click next and under authentication select use strong password encryption for authentication which is recommended and click on next now here set the password for your root user by the way root is the default user this user will have access to everything I will set my password now I’ll click on next and here also we’ll keep the default settings and click on next now to apply configuration we will execute the process once Sol the conf ification steps are complete click finish now you will see the installation is complete it will launch my SQL workbench and my SQL shell after clicking on finish now the shell and workbench has started now we’ll connect by clicking on the root user it will ask for a password enter the password and it will connect successfully yeah the workbench has started now we’ll just connect the server so first we’ll open command prompt now we will reach the path where MySQL files are present you go into this PC local d c program files my SQL my SQL Server 8.0 bin and now I’ll copy this path now we’ll open the command prom and write a command CD space and paste the link and press enter now we write another command that will be my SQL minus u space root minus p and enter now it will ask for your password just enter the password and press enter now the server has started and now we’ll see some commands in my SQL workbench first we will open my SQL workbench now we’ll click on the local instance my SQL 80 and enter the password to connect to the Local Host yeah the my SQL workbench has started now we’ll see some commands the First Command we will see is show databases show databases semicolon and now we will select the whole command and click on this execute button and here we will see the result in the result grit these are the databases that are stored already in the database now there are four databases that is information schema MySQL performance schema and SS now we will select one of the database we will use uh my SQL now we have selected the mySQL database and now in this database we will see which tables are stored in this mySQL database to see that we will run a command show tables we’ll select the command and click on the execute button the these are the tables that are stored in this mySQL database that is columns _ PR component DP and much more now let me now go ahead and open my MySQL workbench so in the search bar I’ll search for MySQL workbench you can see I’m using the 8.0 version I’ll click on it and here it says welcome to my SQL workbench and Below under connections you can see I have already created a connection which says local instance then you have the root the local host and the port number let me click on it you can see the service the username is root and I’ll enter my password and hit okay now this will open the SQL editor so this is how the MySQL workbench looks like here we learn some of the basic SQL commands so first let me show you the databases that are already present so the command is so databases you can hit tab to autoc complete I’ll use a semicolon I’ll select this and here on the top you can see the execute button so if I run this below you can see the output it says show databases seven rows are returned which means currently there are seven databases you can see the names all right now let’s say I want to see the T tables that are present inside this database called world so I’ll use the command use World which is the database name now let me run it so currently I’m using the world database so to display the tables that are present in the world database I can use the show command and write show tables give a semicolon and I’ll hit control enter this time to run it all right so you can see the tables that are present inside this world database so we have three tables in total City Country and Country language now if you are to see the rows that are present in one of the tables you can use the select command so I’ll write select star which basically means I want to display all the columns so star here means to display all the columns then I’ll write my from the table name that is City so this command is going to display me all the rules that are present inside the city table so if I hit control enter all right you can see the message here it says th000 rows were returned which means there were total thousand records present inside the city table so here you can see there’s an ID column a name column this country code district and population all right similarly you can check the structure of the table by using the describe command so I’ll write describe and then I’ll give the table name that is City now let’s just run it there you go the field shows the column names so we have ID name country code district population type here shows the data type of each of the columns so district is character 20 ID is an integer population is also integer null says yes or no which means if no then there are no null values if it’s yes which means there are null values in your table key here represents whether you have any primary key or foreign key and these are some extra information now let’s learn how to create a table in my SQL so I’ll use the create table command for this and before that let me create a database and I’ll name it as SQL intro so the command is create database and I’ll give my database name that is SQL intro me give a semicolon and hit control enter so you can see I have created a new database now if I run this command that is show databases you can see this newly created database that is SQL intro if I scroll down there you go you can see the name here SQL intro okay now within this database we’ll create a table called employee details now this will have the details of some employees so let me first show you how to create a table that will be present inside the SQL intro database so I’ll use the command create table and then I’ll give my table name that is going to be employee uncore details next the syntax is to give the column names so my first column would be the name column which is basically the employee name followed by the data type for this column since name is a text column so I’ll use varar and I’ll give a value of 25 so it can hold only 25 characters okay next I also want the age of the employee now age is always an integer so I’ll give int okay then we can have the gender of the employee so gender can be represented as f for m f for female and M for male so I’m using the card data type or character data type and I’ll give the value as one then let’s have the date of join or doj and this is going to be of data type date all right next we’ll have the city name that is the city to which the employee belongs to so again again this is going to be warar 15 finally we’ll have a salary column and salary we’ll keep it as float since salary can be in decimal numbers as well now I’ll give a semicolon all right so let me just quickly run through it so first I wrote my create command then the table which is also a keyword followed by the table name which is employee details here and then we give the column names such as name age this gender date of join City and salary for each of the columns we also give the data type all right so let me just run it okay so here you can see we have successfully created our first table now you can use the describe command to see the structure of the table I’ll write this describe empore details if I run this there you go so under field you can see the column names then you have the data types null represents if the table can accept null values or not and these are basically empty and we haven’t set any default constraint all right moving ahead now let’s learn to add data to our table using the insert command so on a notepad I have already written my insert statement so let me just copy it and then I’ll explain it one by one all right so if you see this so we have used an insert into statement or a command followed by the table name that is EMP details then this is the syntax using values I have passed in all the records so first we have Jimmy which is the name of the employee then we we have 35 it basically represents the age then m means the gender or the sex then we have the date of join next we have the city to which the employee belongs to and finally we have the salary of the employee so this particular information represents one record or a tle similarly the next employee we have is Shane you can see the age and other information then we have Mary this Dwayne Sara and am all right so let me go ahead and run this so this will help you insert the values in the table that you have created you can see we have successfully inserted six records now to display the records let me use the select statement so I’m using select star from empore details if I run this you can see my table here and the values it has so we have the name column the age column the state of join City salary and these are the values that you can see here moving ahead now let’s say you want to see the Unique city names present in the table so in this case you can use the distinct keyword along with the column name in the select statement so let me show you how you can print the distinct city names that are present in our table now if you notice this table clearly we have Chicago Seattle Boston Austin this New York and this Seattle repeated again so I only want to print the unique values so for that I can write my select statement as select distinct then I’ll give my column name which is City from my table name that is EMP details if I run this you can see my query has returned five rows and these are the values so we have Chicago cattl which was repeated twice is just been shown once then we have Boston Austin and New York now let’s see how you can use inbuilt aggregate functions in SQL so suppose you want to count the number of employees in the table in that case you can use the count function in the select statement so let me show you how to do that so I’ll write select I’ll use my function name name that is Count now since I want to know the total number of employees I’m going to use their name inside the brackets from employee _ details now if I run this this will return the total number of employees that are present in the table so we have six employees in total now if you see here in the result it says count name now this column is actually not readable at all so what SQL provides something called as an alas name so you can give an alas to the resultant output so here I can write select count of name and use an alas as as I can give an alas as countor name and run this statement again there you go you can see here in the resultant output we have the column name as count name which was Alias name now suppose you want to get the total sum of salaries you can use another aggregate function called sum so I’ll write my select statement and this time instead of count I’m going to write sum and since I want to find the sum of salaries so inside the bracket I’ll give my salary column from my table name that is employee details if I run this this will result the total sum of salaries so basically it adds up all the salaries that were present in the salary column now let’s say you want to find the average salary so instead of sum you can write the average function which is ABG so this will give you the average salary from the column salary so you can see it here this says average salary now if you want you can give an alas name to this as well now you can select specific columns from the table by using the column names in the select statement so initially we were selecting all the columns for example like you saw here the star represents that we want to see all the columns from the employee details table now suppose you want to see only specific columns you can mention those column names in the select statement so let’s say I want to select just the name age and the city column from my table that is employee details so this will result in displaying only the name age and City column from the table if I run it there you go it has given only three columns to me now SQL has a we Clause to filter rows based on a particular condition so if you want to filter your table based on specific conditions you can use we Clause now we Clause comes after you give your table name so suppose you want to find the employees with age greater than 30 in this case you can use a we Clause so let me show you how to do it I’ll write select star from my table name that is employee details and after this I’ll use my wear Clause so I’ll write where age greater than 30 if I run this it will give me the output where the age is only greater than 30 so it excluded everything that is less than 30 so we have four employees whose age is greater than 30 here now suppose you want to find only female employees from the table you can also use a wear Clause here so I’ll write select let’s say I want only the name the gender which is sex here comma City from my table that is employee details where I’ll give my column name that is sex is equal to since I want only the female employees I’ll give F and run this statement okay you can see here our employee table has three female employees now suppose you want to find the details of the employees who belong to Chicago or Austin in this case you can use the or operator now the or operator in SQL displays a record if any of the condition separated by R is true so let me show you what I mean so since I want the employees who are from Chicago and Austin I can use an or operator so I’ll write select star from EMP details which is my table name then I’ll give my we Clause where City equal to I’ll give my city name as Chicago and then I’m going to use the or operator or city equal to I’ll write Austin I’ll give a semicolon and let me run it there you go so in the output you can see all the employees who belong to the city Chicago and Austin now there is another way to write the same SQL query so you can use an in operator to specify by multiple conditions so let me just copy this and instead of using the r operator this time I’m going to use the in operator so I’ll delete this after the wear Clause I’m going to write where City and use the in operator inside bracket I’ll give my city names as shago and I want Austin so I’ll give a comma and write my my next city name that is Austin so this query is exactly the same that we wrote on top let me run this you will get the same output there you go so we have Jimmy and Dwayne who are from Chicago and Austin respectively now SQL provides the between operator that selects values within a given range the values can be numbers text or dates now suppose you want to find the employees whose date of join was between 1st of Jan 2000 and 31st of December 2010 so let me show you how to do it I’ll write select star from EMP details where my date of join that is doj between I’ll give my two date values that is 1st of Jan 2000 and I’ll give my second value the date value that is 31st of December 2010 so every employee who has joined between these two dates will be displayed in the output if I run it we have two employees who had joined between 2000 and 2010 so we have Jimmy and Mary here who had joined in 2005 and 2009 respectively all right now in we Clause you can use the and operator to specify multiple conditions now the and operator displays a record if all the conditions separated by and are true so let me show you an example I’ll write select star from employee details table where I want the age to be greater than 30 and I want sex to be male all right so here you can see I have specified two conditions so if both the conditions are true only then it will result in an output if I run it you can see there are two employees who are male and their age is greater than 30 now let’s talk about the group by statement in SQL so the group by statement groups rows that have the same values into summary rows like for example you want to find the average salary of customers in each department now the group by statement is often used with aggregate functions such as count sum and average to group the result set into one or more columns let’s say we want to find the total salary of employees based on the gender so in this case you can use the group by Clause so I’ll write select let’s say sex comma I want to find the total sum of salary as I’ll give an alas name let’s say total salary from my table name that is employee details next I’m going to group it by sex okay let me run it there you go so we have two genders male and female and here you can see the total salary so what this SQL statement did was first it grouped all the employees based on the gender and then it found the total salary now SQL provides the order by keyword to sort the result set in ascending or descending order now the order by keyword sorts the records in ascending order by default to sort the records in descending order you can use the dec keyword so let’s say I want to sort my employee details table in terms of salary so I’ll write select star from empore details and I’ll use my order by clause on the salary column so this will sort all the records in ascending order of their salary which is by default you can see the salary column is sorted in ascending order now suppose you want to sort the salary column and display it in descending order you can use this keyword that is DEC let me run it you can see the output now this time the salary is sorted in descending order and you have the other values as well now let me show you some basic operations that you can do using the select statement so suppose I write select and do an addition operation let’s say 10 + 20 and I’ll give an alas name as addition if I run this it will give me the sum of 10 and 20 that is 30 similarly you can use the subtraction operator and you can change the alas name as let’s say subtract let’s run it you get minus 10 now there are some basic inbuilt functions there are a lot of inbuilt functions in SQL but here I’ll show you a few suppose you want to find the length of a text or a string you can use the length L function so I’ll write select and then use the length function I’ll hit tab to autocomplete let’s say I want to find the length of country India and I’ll give an alas as total length if I run it you see here it returns five because there are five letters in India there’s another function called repeat so let me show you how repeat works so I’ll write select repeat let’s say I want to repeat the symbol that is at the rate I’ll put it in single codes because it is a text character and I want to repeat this character for 10 times close the bracket and let’s run it you can see here in the output it has printed at the rate 10 times you can count it all right now let’s say you want to convert a text or a string to upper case or lower case you can do that as well so I’ll write select and use the function called upper let’s say I want to convert my string that is India to uppercase I’m not giving in any alas name if I run this see my input was capital I and everything else was in small letter in the output you can see it has converted my input to all caps similarly you can change this let’s say you want to print something in lower case you can use the lower function let’s say this time everything is in upper case if I run it it converts India to lower case now let’s explore a few date and time functions let’s say you want to find the current date there’s a function called C which stands for current and this is the function I’m talking about which is current date if I run this you will get the current date that is 28th of Jan 2021 and let’s say you want to extract the day from a date value so you can use the D function let’s say I’ll use D and I want to find the D from my current date if I run this you get 28 which is today’s day now similarly you can also display the current date and time so for that you can use a function that is called now so this will return the current date and time you can see this is the date value and then we have the current time all right and this brings us to the end of our demo session so let me just scroll through whatever we have learned so first I showed you how you can see the databases present in my SQL then we use used one of the databases and checked the tables in it then we created another database called SQL intro for our demo purpose we used that database and then we created this table called employee details with column names like name integer the sex date of joints City and salary I showed you the structure of the database let me run this again so you get an idea you can see this was the structure of our table the then we went ahead and inserted a few records so we inserted records for six employees so you have the employee name the age the gender the date of join the city to which the employee belongs to and the salary of the employee then we saw how you can use the select statement and display all the columns present in the table we learned how you can display the Unique city names we learned how to use different aggregate function like count average and sum then we learned how you could display specific columns from the table we learned how to use we Clause then we used an R operator we learned about in operator the between operator then we used an and operator to select multiple conditions finally we learned about group buy order buy and some basic SQL operations now it’s time to explore some string functions in MySQL so I have given a comment string functions first let’s say you want to convert a certain string into upper case so I can write select the function I’ll use is upper and within this function you can pass in the string let’s say I’ll write India if you want you can give an alas name as let’s say uppercase I’ll give a semicolon and let’s run it there you go so my input was in sentence case and using the upper function we have converted everything into uppercase similarly let me just copy this and I’ll show you if you want to convert a string into a lower case you can use the lower function I’ll run this you can see the result everything is in lower case now of course I need to change the alas name to lower case instead of using lower as the function there is another function that MySQL provides which is called the L case so I’ll just edit this and write L case and let’s say I’ll write India in uppercase let’s run it returns me the same result cool moving on let’s say you want to find the length of a string you can use the character length function I’ll write select use the function character length and I’m again going to pass in my string as India as let’s say total length let’s run it this time I’m going to hit control enter to run my SQL command there you go it has given us the right result which is five because India has five characters in it now these functions you can also apply on a table now let me show you how to do it let’s say we already have the students table and you want to find the length of each of the student names so here you can pass sore name and you can give the same alas name let’s say total length and then you can write from table name that is students if I run this you can see the output it has given me total 20 rows of information this not readable actually let me also so display these student names so that we can compare their length all right I’ll run this again and now you can see the result so Joseph has six characters NES has six vipul has five anubhab has seven similarly if you see Aki has six Tanish has seven ragav has six Cummins has seven rabada has six so on and so forth now instead of using this character length you can also use the function car length it will work the same way let’s see the result there you go it has given us the same result you can either use character length or car length there’s another very interesting function called concat so the concat function adds two or more Expressions together let’s say I’ll write select use the function concatenate the function is actually concat and I’m going to pass in my string values let’s say India is in Asia let’s run this and see our result you can see see here it has concatenated everything let us make it more readable I’ll give a space in between so that you can read it clearly now this is much more readable India is in Asia and if you want you can give an alas name as well as let’s say merged there you go now the same concat operation you can also perform on a table I’m going to to use the same students table let’s say I want to return the student ID followed by the student name and then I am going to merge the student name followed by your space followed by the age of the student and I can give an alas as let’s say name _ AG from my table that is students let’s see how this works okay you see here the result is very clear we have the student ID the student name and the concatenated column that we created which was name _ age where we have the student name with a space followed by the age of the student if I scroll down you can see the rest of the results cool now moving ahead let’s see how the reverse function Works in MySQL so the MySQL reverse function returns a string with the characters printed in reverse order so suppose I write select reverse I’ll use the same string again let’s say I have India let’s run it you will see all the characters printed in reverse order again you can perform the same operation on a table as well let’s say I’ll write select reverse and I’ll pass in the column as student name from my table that is students let’s run it it gives you 20 students and all the names have been printed in reverse order okay now let’s see what the replace function does so the replace function replaces all occurrences of a substring within a string within a new substring so let me show you what I mean I’ll write select replace I’ll pass in my input string which is let’s say orange is a vegetable which is ideally incorrect I’m purposely writing this so that I can replace the word vegetable with fruit okay so what this replace function does is it is going to find where my word vegetable is within the string my input string and it is going to replace my word vegetable with fruit let’s run it and see the output there you go now this is correct which is Orange is a fruit all right now MySQL also provides some trim functions you can use the left trim right trim and just the trim function so let me show you how this left trim Works left trim or L trim removes the leading space characters from a string passed as an argument so see I write select I’ll use the left trim function which is L trim and then I’m going to purposely give a few pces in the beginning of the string I’ll give a word let’s say India and then I’ll give some space after the word India and see how the elri works if I run this it gives me India which is fair enough but before that let’s first find the length of my string so I’ll use my length function here and within this function I am going to find the length of my string which has India along with some leading and trailing spaces I’ll paste this here give a semicolon and I’ll run it okay so the entire string is 17 characters long or the length of the string is 17 now say I use lrim on my same string what it returns me is India and if I run length over it you can see the difference as in you can see how many spaces were deleted from the left of the string you can see here now it says 17 and I’m going to use lrim let’s see the difference it gives me 12 the reason being it has deleted five spaces from the left you can count it 1 2 3 4 and 5 so 17 – 5 is 12 which is correct similarly you can use the rri function which removes the trailing spaces from a string trailing spaces are these spaces when you use left Rim it deletes the leading spaces which is this now let me just replace L trim with r trim which stands for right trim and see the result so the length is 10 now the reason being it has deleted seven spaces from the right of the string if you can count it 1 2 3 4 5 6 and 7 cool you can also use the trim function which will delete both the leading and the TR in spaces so here if I just write trim and I’ll run it it gives me five because India is total five characters long and it has deleted all the leading and the trailing spaces all right there’s also a function called position in MySQL the position function Returns the position of the first occurrence of a substring in a string so if the substring is not found with the original string the function will return zero so let’s say I’ll write select position I want to find where fruit is in my string that is Orange is a fruit I’ll give an alas as name there some error here this should be within double quotes now let’s run it and see the result okay it says at the 13th place or at the 13th position we have the word fruit in our string which is Orange is a fruit now the final function we are going to see is called asky so the asky function Returns the asky value for a specific character let’s say I write select ask key of the letter small a if I run this it will give me the ask key value which is 97 let’s say you want to find the ask key value of 4 let’s see the result it gives me 52 all right in this session we are going to learn two important SQL statements or Clauses that are widely used that is Group by and having first we’ll understand the basics of group by and having and then jump into my SQL workbench to implement these statements so let’s begin first what is Group by in SQL so the group by statement or Clause groups records into summary rows and returns one record for each group it groups the rows with the same group by item expressions and computes aggregate functions for the resulting group a group by Clause is a part of Select expression in each group no two rows have the same value for the grouping column or columns now below you can see the syntax of group by so first we have the select statement and Then followed by the column names that we want to select from we have the table name followed by the wear condition and next we have the group by clause and here we include the column names finally we have the order by and the column names now here is an example of the group by Clause so we want to find the average salary of employees for each department so here you can see we have the employees table it has the employee ID the employee name the age of the employee we have the gender the date on which the employeer had joined the company then we have the department to which each of these employees belong to we have the city to which the employees belong to and then we have the salary in dollars so actually we’ll be using this employees table on my SQL workbench as well so if you were to find the average salary of employees in each department so this is how your SQL query with Group by Clause would look like so we have selected department and then we are using an aggregate function that is AVG which is average and we have chosen the salary column and here we have given an alias name which is average uncore salary which appears in the output you can see here from employees and we have grouped it by department so here in the output you can see we have the department names and the average salary of the employees in each department now let me take you to my MySQL workbench where we’ll Implement Group by and solve specific problems okay so I am on my MySQL workbench so let me make my connection first I’ll enter the password so this will open my SQL editor so first of all let me check the databases that I have so I’ll use my query that is show databases let’s run it okay you can see we have a list of databases here I’m going to use my SQL intro database so I’ll write use SQL intro so this will take us inside this database I run it all right now you can check the tables that are present in SQL intro database if I write show tables you can see the list of tables that are already present in this database to do our demo and understand Group by as well as having let me first create an employee table so I’ll write create table employees next I’ll give my column name as employee _ ID which is the ID for each employee I’ll give my data type as integer and I’ll assign employee ID as my primary key next I’ll give employee name and my data type would be varar I’ll give the size as 25 my third column would be the age column age would obviously be an integer then I have my gender column I’ll use character data type and assign a value of one or size of one next we have the date of join and the data type will be date we have the department column as well this is going to be of varar and 20 will be the size next we have the city column which is actually the city to which the employee belongs to and finally we have the salary column which will have the salary for all the employees okay now let me select and run this you can see here we have successfully created our table now to check if our table was created or not you can use the describe command I’ll write describe employees you can see the structure of the table so far all right now it’s time for us to insert a few records into this employees table so I’ll write insert into employees and I’ll copy paste the records which have already written on a notepad so let me show you so this is my EMP notepad and you can see I have already put the information for all the employees so let me just copy this and we’ll paste it here all right let me go to the top and verify if all the records are fine all right so let’s run our insert query okay so you can see here we have inserted 20 rows of information and now let’s check the table information or the records that are present in our employees table I’ll write select star from employees if I run it you can see here I have my employee ID the employee name age gender we have the city salary and in total we have inserted 20 records now let me run a few SQL commands to check how the structure of our table is let’s say I want to see the distant cities that are present in our table so I’ll write select distinct City from employees if I run on this you see here there are total eight different cities present in our employees table so we have Chicago the Seattle Boston we have New York Miami and Detroit as well now let’s see you want to know the total number of departments that are present so you can use distrct Department if I run this all right you can see we have seven rows returned and here are the department names so we have sales marketing product Tech it finance and HR all right now let me show you another SQL command now this is to use an aggregate function so I want to find the average age of all the employees from the table so I can write select AVG which is the aggregate function for average inside that I have passed my age column from employees if I run this so the average age of all the employees in our table is 33.3 now say you want to find the average age of employees in each department so for this you need to use the group by Clause I’ll give a comment here I want to find the average each in each department so I’ll write select Department comma I’ll write average of age from employees Group by department now if I run this you can see here we have our seven departments on the left and on the right you can see the average age of employees in each of these departments now you can see here in the output it says AVG of age which is not readable so I can give an alas name as average age all right I can bring this down and if you want you can round the values also so you can round the decimal places so I’ll use a round function before the average function and the round function takes two parameters one is the variable and the decimal place you want to round it to so if I run this there you go you can see here we have the average age of all the employees in each of these departments all right now suppose you want to find the total salary of all the employees for each department so you can write select Department comma Now I want the total salary so I’ll use the sum function and I’ll pass my column as salary from employees Group by Department let’s run this query you can see here in the output we have the different departments and on the right you can see the total salary of all the employees in each of these departments now here also you can give an alas name as total underscore salary let’s run it again and you can see the output here all right now moving ahead you can also use the aut by Clause along with the group by Clause let’s say you want to find the total number of employees in each City and group it in the order of employee ID so to do this I can use my select query I’ll write select count of let’s say employee ID and I want to know the city as well from employees Group by City And next you can use the order by Clause I’ll write order by count of employee ID and I’ll write DEC which stands for descending if I run this query you can see here on the left you have the count of employees and on the right you can see the city names so in Chicago we had the highest number of employees working that was four then we had Seattle Houston Boston Austin and the remaining also had two employees so in this case we have ordered our result based on the count of employee ID in descending order so we have the highest number appearing at the top and then followed by the lowest okay now let’s explore another example suppose we want to find the number of employees that join the company each year we can use the year function on the date of joining column then we can count the employee IDs and group the result by each year so let me show you how to do it so I’ll write select I’m going to extract Year from the date of join column I’ll give an alas as year next I’ll count the employee ID from my table name that is employees and I’m going to group it by Year date of join we give a semicolon all right so let’s run this great you see here in the result we have the year that we have extracted from the date of join column and on the right you can see the total number of employees that joined the company each year so we have in 2005 there was one employee similarly we have in 2009 there were two employees if I scroll down you have information of other years as well now if you want you can order this as well based on year or count okay now you can also use the group bu to join two or more tables together so to show you this operation let me first create a sales table so I’ll write create table sales and the sales table will have column such as the product ID which is going to be of integer type then we have the selling price of the product now this will be a float value then we have the quantity sold for each of the products so I’ll write quantity quantity will of integer type next we have the state in which the item was sold and state I’ll put it as worker and give the size as 20 let’s run this so that we’ll create our sales table all right so we have successfully created our sales table next we need to insert a few values to our sales table so I’ve have already written the records in a notepad let me show you okay so here you can see I have my sales text file let me just copy these information I’ll just paste it on the query editor okay now let me go ahead and run this insert command all right so you can see here we have successfully inserted nine rows of information so let me just

    run it through what we have inserted so the First Column is the product ID column then we have the selling price at which this product was sold then we have the quantity that was sold and in which state it was sold so we have California Texas Alaska then we have another product ID which is 123 and these are the states in which the products were sold so let me just confirm with the select statement I’ll write select star from sales I run this you can see we have successfully created our table okay now suppose you want to find the revenue for both the product IDs one to one and let’s say 1 to three since we have just two product IDs here so for that you can use the select query so I’ll write select product ID next I want to calculate the revenue so revenue is nothing but selling price multiplied by the quantity so I’ll use the sum function to find the total revenue and inside the sum function I’ll use my selling price column multiplied by my quantity column I’ll give this an alas name as revenue from my table name that is sales finally I’ll group it by product ID let’s run it there you go so here you can see we have the two product IDs one 121 and 1 12 3 and here you can see the revenue that was generated from these two products all right now let’s see we have to find the total profit that was made from both the products 1 to 1 and 1 to 3 so for that I’ll create another the table now this table will have the cost price of both the products so let me create the table first I’ll write create table let’s say the table name is C product which stands for the cost price of the products I’ll give my first column as product ID this will be an integer and I’ll have my second column as cost price cost price will have floating type values let’s run this so we have successfully created our product cost table now let me insert a few values into the C product table so I’ll write insert into ccore product I’ll give my values for one to one let’s say the cost price was $270 for each and next we have my product as 123 and let’s say the cost price for product 1 123 was $250 let’s insert these two values okay next we’ll join our sales table and the product cost table so this will give us the profit that was generated for each of the products so I’ll write select C do productor ID comma I’ll write sum s. cellor price now here C and S are alas names so if I subtract my cost price from the selling price that will return the profit that was generated I’ll multiply this with s do quantity close the bracket I’ll give an alas name as profit from sales as s so here s stands for the sales table I’m going to use inner join ccore product table as the Alias name should be C where s do productor ID is equal to C do productor ID we are using product underscore ID because this column is the common column to both the tables and finally I’m going to group it by C do productor ID all right so let me tell you what I have done here so I’m selecting the product ID next I’m calculating the profit by subtracting the cost price from the selling price and I multiplied the quantity column I’m using an join to connect my sales and the product cost table and I am joining on the column that is product ID and I have grouped it by c. product ID let’s run this there you go so here you can see for product id1 121 we made a profit of $1,100 and for product ID 1 123 you made a profit of $840 so now that we have learned Group by in detail let’s learn about the having clause in SQL the having clause in SQL operates on grouped records and returns rows where aggregate function results matched with given conditions only so now having and wear Clause are kind of similar but we Clause can’t be used with an aggregate function so here you can see the syntax of having Clause you have the select statement followed by the column names from the table name then we have the we conditions next we have the group bu finally we have having and at last we have order by column names so you can see here we have a question at hand we want to find the cities where there are more than two employees so you can see the employee table that we had used in our group by Clause as well so if you were to find the cities where there are more than two employees so this is how your SQL queries should look like so we have selected the employee ID and we are finding out the count using the count function next we have selected the city column from employees we have grouped it by City And then we have used our having Clause so we have given our condition having count of employee ID should be greater than two so if you see the output we have the different city names and these were the cities where the count of employees was greater than two all right so let’s go to our MySQL workbench and Implement how having works so suppose you want to find those departments where the average salary is greater than $75,000 you can use the having clause for this so let me first run my table which is employees if I run this you can see we had inserted 20 rows of information and the last column we had was salary so the question we have is we want to find those departments where the average salary is greater than $75,000 so let me show you how to do it so I’ll write select Department comma I’ll use the aggregate function that is average salary I’ll give an alas name as AVG underscore salary from employees next we’ll use the group by clause and I want to group it by each department and then I’m going to write my having Clause so in having Clause I’ll use my condition that is having average of salary greater than $75,000 let’s run it and see the output there you go so here you can see there were total three departments in the company that is sales finance and HR where the average salary is greater than $775,000 okay next let’s say you want to find the cities where the total salary is greater than $200,000 so this will again be a simple SQL query so I’ll write select City comma I want to find the total salary so I’ll use the sum function and I’ll pass my column as salary as I’ll give a alas name as total from employees Group by City And then I am going to use my having Clause I’ll pass in my condition as having sum of salary greater than $200,000 all right so let’s run this query there you go so so the different cities are Chicago Seattle and Houston where the total salary was greater than $200,000 now suppose you want to find the Departments that have more than two employees so let’s see how to do it I’ll write select Department comma this time since I want to find the number of employees I’m going to use the count function I’ll write count Star as employee uncore count or empore count which is my alas name from employees next I’ll group it by Department having I’ll give my condition count star greater than 2 let’s run this okay so you have departments such as sales product Tech and it where there are more than two employees okay now you can also use a wear Clause along with the having clause in an SQL statement so suppose I want to find the cities that have more than two employees apart from Houston so I can can write my query as select City comma count Star as EMP count from employees where I’ll give my condition City not equal to Houston I’ll put it in double code since I don’t want to see the information regarding Houston I’ll group it by City having count of employees greater than two so if I run this query you see we have information for cicago and cattl only and we have excluded the information for Houston now you may also use aggregate functions in the having Clause that does not appear in the select Clause so if I want to find the total number of employees for each department that have an average salary greater than $75,000 I can write it something like this so select Department comma count star as EMP count from employees Group by department and in the having Clause I’m going to provide the column name that is not present in the select expression so I’ll write having average salary greater than 75,000 this is another way to use the having Clause let’s run this all right you can see we have department sales finance and HR and you can see the employ count where the average salary was greater than 75,000 okay so let me run you from the beginning what we did in our demo so first we created a table called employee then we inserted 20 records to this table next we explored a few esql commands like distinct then we used average and finally we started with our group by Clause followed by looking at how Group by can be used along with another table and we joined two tables that was sales and product cost table to find out the profit then you learned how to use the having Clause so we explored several different questions and learned how to use having an SQL in this session we will learn about joints in SQL joints are really important when you have to deal with data that is present on multiple tables I’ll help you understand the basics of joints and make you learn the different types of joints with Hands-On demonstrations on MySQL workbench so let’s get started with what are joints in SQL SQL joint statement or command is often used to fetch data present in multiple tables SQL joints are used to combine rows of data from two or more tables based on a common field or column between them now consider this example where we have two tables an orders table and a customer table now the order table has information about the order ID which is unique here we have the order date that is when the order was placed then we have the shipped date this has information about the date on which the order was shipped then we have the product name which basically is the names of different products we have the status of delivery whether the product was delivered or not or whether it was cancelled then we have the quantity which means the number of products that were ordered and finally we have the price of each product similarly we have another table called customers and this customer table has information about the order ID which is the foreign key here then we have the customer ID which is the primary key for this table we also have the phone number customer name and address of the customers now suppose you want to find the phone numbers of customers who have ordered a laptop now to solve this problem we need to join both the tables the reason being the phone numbers are present in the customers table as you can see here and laptop which is the product name is present in the orders table which you can see it here so using a join statement you can find the phone numbers of customers who have ordered a laptop now let’s see another problem where you need to find the customer names who have ordered a product in the last 30 days in this case we want the customer name present in the customer’s table and the last 30 days order information which you can get from the order date column that is present in the orders table okay now let’s let’s discuss the different types of joints one by one so first we have an inner joint so the SQL inner joint statement returns all the rows from multiple tables as long as the conditions are met from the diagram ADB you can see that there are two tables A and B A is the left table and B is the right table the orange portion represents the output of an inner joint which means an inner joint Returns the common records from both the tables now you can see the syntax here so we have the select command and then we give the list of columns from table a which you can see here is the left table followed by the inner join keyword and then the name of the table that is B on a common key column from both the tables A and B now let me take you to the MySQL workbench and show you how inner join Works in reality so here I’ll type MySQL you can see I have got my SQL workbench 8.0 version installed I’ll click on it it will take some time to open okay I’ll click on this local instance and here I’ll give my password okay so this is how an SQL editor on my SQL workbench looks like so first of all let me go ahead and create a new database so I’ll write create database this is going to be my command followed by the name of the database that is going to be SQL joints I give a semicolon and hit control enter this will create a new database you can see here one row affected now you can check whether the database was created or not using show databases command if I run it here you can see I have SQL joints database created now I’ll use this database so I’ll write use SQL joints okay now to understand inner join consider that there is a college and in every College you have different teams for different sports such as Cricket football basketball and others so let’s create two tables cricket and football so I’ll write create table and my table name is going to be cricet next I’m going to create two columns in this table the First Column is going to be cricet ID then I’m going to give the data type as int and use the autoincrement operator I’m using Auto increment because my Cricket ID is going to be my primary key then I’m going to give the name of the students who are part of the cricket team and for this I’ll use war card data type and give the length as 30 I’ll give another comma and I’ll assign my Cricket ID as primary key within brackets I’ll give ccore ID cricket ID is nothing but a unique identifier for each of the players like you have role numbers in college okay let me just run it all right so we have successfully created our cricket table similarly let me just copy this and I’ll paste it here I’ll create another table called football this will have the information of all the students who are part of the football team and instead of cricket I am going to give this as football idid all right and the name column will have the names of the students I’ll change my primary key to football ID all right let me run this okay so now we have also created our football table the next step is to insert a few player names into both the tables so I’ll write my insert into command first let’s load some data to our cricket table so I’ll write cricet and I’ll give my name column followed by values and here I’ll give some names such as let’s say Stuart we give another comma the next player I’ll choose is let’s say Michael similar I’ll add a few more let’s say we have Johnson the fourth player I’ll take is let’s say hidden and finally we have let’s a Fleming okay now I’ll give a semicolon and run this okay so let me just check if all the values were inserted it properly for this I’ll use select star from table that is Cricket if I run it you can see I have created a table and have successfully inserted five rows of information now similarly let’s insert a few student names for our football table so I’ll change this to football and obviously there would be students who will be part of both cricket and football team so I’ll keep a few repeated names let’s say Stuart Johnson and let’s say Hayden are part of both cricket and football team then we have let’s say Langer and let’s say we have another player in the football team that is astral I’ll just run it okay you can see there are no errors so we have successfully inserted values to our football team as well let me just recheck it I’ll write select star from football all right so we have five players in the football team as well okay now the question is suppose you want to find the students that are part of both the cricket and football team in this case you can use an inner join so let me show you how to do it so I’ll write select star from cricket as I’m using an alias name as C which stands for Cricket then I’m going to write inner join my next table is going to be football as F which is an alas name for the football table then I’m going to use the on command or operator and then I’ll give the common key that is name here so C do name is equal to F do name So based on this name column from both the table my inner John operation will be performed so let’s just run it there you go so Stuart Johnson and Hayden are the only three students who are part of both the teams all right now you can also individually select each of the columns from both the tables so let’s say I write select c. ccore ID comma C do name comma F do football ID comma f. name from I’ll write Cricket as C inner join football as F on C do name is equal to F do name now if I run this you see we get the same output here as well all right now let’s explore another example to learn more about inner joints so we have a database called classic models let me first use classic models I’ll run this okay now let me just show the different tables that are part of classic tables all right so here you can see there are tables like customers there’s employees office there’s office details orders payments products and product lines as well all right so let me use my select statement to show what are the columns present in the products table okay so this product table has information about different product names you have the product code now this product code is unique here we also have the product vendor a little description about the product then we have the quantity in stock buying price and MSRP let’s see what we have in product lines if I run it you see here we have the product line which is the primary key for this table then we have the textual description for each of the products this is basically some sort of an advertisement all right now suppose you want to find the product code the product name and the text description for each of the products you can join the products and product lines table so let me show you how to do it I’ll write my select statement and choose my columns as product code then we have product name and let’s say I want the text description so I’ll write this column name okay then I’ll use from my first table that is products inner join product lines I can use using the common key column that is product line close the bracket I’ll give a semicolon and if I run it there you go so you can see the different product codes then we have the different product names and the textual description for each of the products so this we did by joining the products table and the product lines table all right now suppose you want to find the revenue generated from each product order and the status of the product to do do this task we need to join three tables that is orders order details and products so first let me show you what are the columns we have in these three tables you have obviously seen for the products table now let me show you for orders and Order details table so I’ll write select star from orders if I run it you can see it has information about the order number the date on which the order was placed we also have the shipment date we also have the status column which has information regarding whether the order was shipped or cancelled then we have some comments column we also have the customer number who ordered this particular product similarly let’s check what we have under order details so I’ll write select star from order details if I run it you can see it has the order number the product code quantity of each product we have the price of each product then we have the order line number okay so using the product orders and Order details let’s perform an inner join so I’ll write select o do order number comma o do status comma I need the product name which I’ll take from the products table so I’ll write P do product name now here o p are all alas name for the tables orders products and I’ll use OD for order details comma since we want to find the revenue we actually need to find the product of quantity ordered into price of each product so I’ll use a sum function and inside the SU function I’ll give quantity ordered multiplied by the price of each item I’ll use an alas as Revenue then I’ll use my from Clause from orders as o inner join order details as I’ll use an alas name as OD on I’ll write o do order number is equal to OD do order number I’ll use another inner join and this time we’ll join the products table so I’ll write inner join products as p on P do product code is equal to OD do product code and finally I’ll use the group by clause and group it by order number all right let me run this okay there’s some mistake here we need to debug this it says you have an error in your SQL syntax check the manual all right okay I think the name of the tables is actually orders or not order all right now let’s run it okay there’s still some error it says classic models. product doesn’t exist so so again the product name is I mean the table name is products and not product so let’s run it again all right there you go so we have the order number the status the product name and the revenue this we got it using inner join from three different tables now talking about left joins the SQL left join statement returns all the rows from the left table and the matching rows from the right table so if you see this diagram you can see we have all the rows from the left table that is a and only the matching rows from the right table that is B so you can see this overlapped region and the Syntax for SQL left join is something like this so you have the select statement and then you give the list of columns from table a which is your left table then you use the left join keyword followed by the next table that is table B on the common key column so you write a do key is equal to B do key okay now in our classic models database we have two tables customers and orders so if you want to find the customer name and their order ID you can use these two tables so first let me show you the columns that are present in customers and orders I think orders we have already seen let me first show you what’s there in the customer table okay so you can see we have the customer number the name of the customer then we have the contact last name the contact first name we have the phone number then there’s an address column there are two address columns actually we have the city name the state and we have other information as well and similarly we have our orders table so I’ll write select start from orders so I’ll write select star from orders if I run this you can see these are the information available in the orders table okay so let’s perform a left join where we want to find the customer name and their order IDs so I’ll write select C do customer name or let’s say first we’ll choose the customer number comma then I want the customer name so I’ll write C do customer name then we have the order number column which is present in the orders table and let’s say I also want to see the status then I’ll give my left table that is customers as C left join orders as o on C Dot customer number equal to O do customer number let’s run it okay again there is some problem all right so the table name is customers let’s run it so there’s another mistake here this is customer number so B is missing cool let me run it all right so here you can see we have the the information regarding the customer number then the respective customer names we have the order number and the status of the shipment so if I scroll down you’ll notice one thing there are a few rows you can see which have null values this means for customer number 125 and for this particular customer name there were no orders and similarly if I scroll down you will find a few more null values you can see here there are two null Val values here for customer number 168 and 169 there were no orders available all right now to check those customers who haven’t placed any orders you can use the null operator so what I’ll do is here I’ll just continue with this I’ll use a where clause and write where order number is null now let me run this okay so here you can see there are 24 customers from the table that don’t have any orders in their names okay now talking about right joins so SQL right join statement returns all the rows from the right table and only matching rows from the left table so here you can see we have our left table as a and the right table as B so the right join will return all the rows from the right table and only the matching rows from the left table now talking about the syntax so here you can see we have the select statement followed by the select statement you’ll have the list of columns that you want to choose from table a write join table B on the common key column from both the tables all right now to show how write join works I’ll be using two tables that is customers and employees so let’s see the rows of data that are present in the customer table first so I’ll write select star from customers let’s run it so here you have the customer number the customer name then we have the phone number the address of the customers you also have the country to which the customer belongs to the postal code and the credit limit as well similarly let’s see for the employees table here I’ll change customer customers to employees let’s run it okay so we have the employee number the last name the first name you have the extension the email ID the job title and also reports to here means the manager okay so based on these two tables we’ll find the customer name the phone number of the customer and the email address of the employee and join both the tables that is customers and employees so let me show you the command so I’ll write select C do customer name comma then we have C do phone I’ll give a space here next I want the employee number from the employee table so I’ll write e do employee number comma e do email from customers as C right join employees as e on E do my common key column is employee number here so I’ll write e do employee number is equal to C dot we have sales Representatives employee number and I’m also going to order it by the employee number column okay so you can see I have my customer name selected from the customers table the phone number of the customer then we have the employee number and the email address so let me run it okay there’s some problem all right so the table name is customers actually let’s run it once again there you go so you can see here we have all the values selected from our right table which is the employees table you can see right on employees which means your employees table is to the right and then we have the customer name and phone numbers of the customers from the customer table which is actually your left table so you have a few employee number such as one2 this 1056 which don’t have any customer name or phone numbers okay so there’s another popular join which is very widely used in SQL known as self joints so self joints are used to join a table to itself so in our database we have a table called employees let me show you the table first all right so here you can see we have the employee number the last name the first name of the employee you have the email ID and here if you see we have a column called reports 2 now this you can think of as the manager column so the way to read is for example for employee number 1056 the manager is one2 so if you check for one2 we have Dane Murphy then if I scroll down let’s say for employee number 1102 yeah for employee number 1102 the manager is 1056 so here you can see who is at 1056 you have Mary Patterson similarly if I scroll down let’s say for employee number 11 188 we have the manager as 11 43 now if I check the table at 1143 we have Anthony bow so so the employee Julie feli reports to Anthony bow all right now suppose you want to know who is the reporting manager for each employee so for that you can use a self jooin so let me show you how to join this employees table I’ll write select and then I’m going to use a function called concat within brackets I’ll start with my alas name that is m dot then I’ll write last name I’m going to concat last name followed by a comma then I’ll have my first name I’ll close this bracket and then I’m going to give my alas name let’s say manager here comma next I’m going to concat the same last name and first name and this time I’m going to use a separate alas let’s say e which stands for employee so I’ll write e do last name comma and within single codes I’ll give my comma and then I’ll write e do first name I close this bracket I’ll give an alas as let’s say employee from I’ll write employees as e inner join employees as M on M do I’ll use my common key column as employee number so I’ll write M do employee number is equal to e do here I’m going to use the reports two column and then I’ll order it by let’s say manager okay now let’s run this there you go so you have your two columns as manager and employee so for employee Louie bonder the manager is zarad bonder similarly if I scroll down you have there are multiple employees reporting to this particular manager similarly we have our manager as Anthony bow and we have different employees who are reporting to this particular manager and so on all right now moving ahead now let’s see what a full join is so SQL full outer join statement returns all the rows when there is a match in either left or right table now you must remember that MySQL workbench does not support full outer join by default but there’s a way to do it so by default this is how the syntax of full outer joint looks like now this statement will work on other SQL databases like micros moft SQL server but it won’t work on MySQL workbench I’ll show you the right way of using full auto join on MySQL workbench so to show full outer join I’m going to first use a left join and then we’ll also use a right join and finally we’ll use a union operator so the union operator is used to combine the result set of two or more select statements so first of all let me write C do customer name so for this example I’m using the customer table and the order table comma o do order number so I just want to know the customer name and the order number related to the customer from I have customers as C left join I’ll write orders as o on C do customer number is equal to O do customer number let me just copy this and after this I’m going to use my union operator so Union operator is used to merge results from two or more tables so basically this performs a vertical join and next I am going to use my right join operation so here instead of left join I’ll write right rest all looks fine let me just run it there you go so we have successfully run our full outer join operation you can see we have the different customer names and the order that each customer had placed all right so that brings us to the end of our demo session so let me just run through whatever we did in this session so first we created a database called SQL joints then we created two tables like cricket and football then we had inserted a few rows to each of these tables then we used this table to learn about inner join next we used a database called classic models it had multiple tables so we explored all of these tables like products there was product lines orders customers and employees and learned how to use inner join left join self join right join as well as full outer join in this video we will learn what is a subquery and look at the different types of subqueries then we learn subqueries with select statement followed by subqueries with insert statement moving further we will learn subqueries with the update statement and finally we look at subqueries with delete statement all these we will be doing on our MySQL workbench so before I begin make sure to subscribe to the simply learn Channel and hit the Bell icon to never miss an update so let’s start with what is a subquery so a subquery is a select query that is enclosed inside another query so if I show you this is how the basic structure of a subquery looks like so here whatever is present inside the brackets is called as the inner query and whatever is present outside is called the outer query so first the inner query gets executed and the result is returned to the outer query and then the outer query operation is performed all right now let’s see an example so we have a question at hand which is to write a SQL query to display Department with maximum salary from employees table so this is how our employees table looks like it has the employee ID the employee name age gender we have the date of join Department City and salary now to solve this query my subquery would look like this so I’ll first select the department from my table that is employees where I’ll use the Condition salary equal to and then I’ll pass in my inner query which is Select Max of salary from employees so what this does is it will first return the maximum salary of the employees in the table then our outer query will get executed based on the salary returned from the inner query so here the output is department sales has the maximum salary so one of the employees from the sales department earns the highest of the maximum salary if you see in our table the employee is Joseph who earns $115,000 all right and Joseph is from the sales department now let’s see how this query works so here we have another question which is to find the name of the employee with maximum salary in the employees table so this is our previous employees table that we saw and to find the employee who has the maximum salary my subquery would look something like this so I’m selecting the employee name from my table that is employees where I’m using the Condition salary equal to and then then I’m passing in my subquery or the inner query so first I’m selecting the maximum salary this will return a particular value that is the highest salary from the table and if you see our table the highest salary is $115,000 so our query becomes select employee name from employees where salary equal to $115,000 so the employee name is Joseph here and that’s the output now if you want to break it down here you can see first the inner query gets executed so our SQL query will first execute the inner query that is present inside brackets select maximum salary from employees the result is $115,000 and then based on the returned result our outer query gets executed so the query becomes select employee name from employees where salary equal to $115,000 and that employee is Joseph all right now we’ll learn the different types of subqueries so you can write subqueries using select statement update statement delete and insert statement we’ll explore each of this with the help of example on my my SQL workbench so let’s learn subqueries with the select statement so subqueries are majorly used with the select statement and this is how the syntax looks like you select the column name from the table name then you have the WHERE condition followed by The Columns that you want to pass the operator and inside that you have the subquery so here is an example that we will perform on our MySQL workbench so in this example we want to select all the employees who have a salary less than average salary for all the employees this is the output so let’s do this on my MySQL workbench all right so let me log into my local instance I’ll give my password okay so you can see I’m on my MySQL workbench so let’s start by writing our subquery using the select statement okay so for this demo session we’ll be using a database that is subqueries you can see it here I have a database called subqueries so I’ll use this subqueries database and we’ll create a few tables as well okay if I run it now we are inside the subqueries database so let me just show you the tables that are present inside this database I’ll write show tables if I run it okay there are two tables employees and employees undor B uh we’ll use this table throughout our demonstration all right now for our select subquery we want to fetch the the employee name the department and the salary whose salary is less than the average salary so we will be using the employees table so let me first show you the records and the columns we have in the employees table so I’ll write select star from employees and run it okay you can see here we have 20 rows of information we have the employee name the employee ID age gender date of join Department City and salary so this is the same table that we saw in our slide slides okay now for our subquery I’ll write select I want to choose the employee name the department and the salary there should be a comma here instead of a period next I’ll give my table name that is employees where my salary is less than and after this I’ll start my inner query or the subquery I’ll write select average salary so I’m using the AVG function to find the average salary of all the employees from my table that is employees if I give a semicolon and run this you’ll see the output so we have total 12 employees in the table whose salary is less than the average salary now if you want you and check the average salary so the average salary is $753 now the employees who have a salary less than the average salary so these are the people all right now moving back to our slides okay now let’s see how you can use subqueries with the insert statement now the insert statement uses the data return from the subquery to insert into another table so this is how the syntax looks like so you write insert into table name followed by select individual column so start from the table use the wear clause and then you give the operator followed by the inner query or the subquery so here we will explore a table called products table we are going to fetch few records from the products table based on a condition that is the selling price of of the product should be greater than $100 so only those records will fetch and put it in our orders table all right so we are going to write this query on my MySQL workbench so let’s do it I’ll give my comment as update subquery all right so first of all let’s create a table that is products so I’ll write create table products then we’ll give our column names the First Column would be the product ID of type integer then we have the column as item or the product which is of type Vare 30 next we have the selling price of the product the selling price will be of type float and finally we have another column which is called the product type and again product type is of the data type bar car I’ll give the size as 30 close the bracket and give a semicolon now let’s just run it okay so we have successfully created our products table now let’s insert a few records to our products table so I’ll write insert into products for followed by values I’ll give four records the first product ID is 101 the product is let’s say jewelry then the selling price is let’s say $800 and the product type is it’s a luxury product next let’s insert one more product detail the product ID is 102 the product is let’s say t-shirt the price is let’s say $100 and the product type is non-luxury next I’ll just copy this to reduce our task we’ll edit this the third product’s ID is 103 the product is laptop and let’s say the price is $1,300 and it’s a luxury product I’ll paste again and finally I’ll enter my fourth product which is let’s say table and the price is $400 and it’s a non-luxury product I’ll give a semicolon and we’ll insert these four records to our products table you can see see we have inserted four records let’s just print it now so I’ll write select star from products if I run it you can see we have our four products ready now we need to create another table where we are going to put some records from our products table so that new table is going to be the orders table so I’ll write create table orders now it will have three columns the order ID order ID will be of type integer then we have product underscore sold this will be of type varing character of size 30 and finally we have the selling price column this will be of type float let’s create our orders table the table name should be orders and there is some mistake here okay we should close the brackets okay let me run it so we have our orders table ready now let’s write our insert subquery so I’m going to insert into my table that is orders and I’ll select the product ID comma the item and the selling price or the sell price from my table that is products where I’ll write product ID in I’ll write my inner query select prodad ID or the product ID from products next I’ll give a wear Clause where the selling price is greater than $11,000 so let me tell you what I’m going to do here I’m going to insert into my orders table the product ID the item name and the s selling price from my products table where the product ID has this condition so let me first run this condition for you which is Select prod ID from products where the selling price is greater than 1,000 if I run this okay there is some issue here the column name is actually prodad ID now let’s run it again so that we can see the product IDs of the products which have a selling price greater than 1,000 so it is 101 and 103 now let’s run the entire query there is another mistake here let’s debug the mistake now this should be product ID instead of product _ in let’s insert again all right so we have successfully inserted two records to our table that is orders now let’s see the orders table I’ll write select star from orders if I run it there you go so there were two products from our product table that were jewelry and laptop which have a selling price greater than $11,000 so the selling price for jewelry was $1,800 and for laptop it was $1,300 so this is how you can use a subquery using the insert statement all right now going back to our slides again all right now let’s see how you can use subqueries with the update statement now the sub sub queries can be used in conjunction with the update statement so either single or multiple columns in a table can be updated when using a subquery with the update statement so this is how the basic syntax of an update subquery looks like so you write update table followed by the table name you set the column name you give the we operator and then you write your inner subquery so we are going to see an example where we’ll use this employees table and using this employees table we will update the records of the salaries of the employees by multiplying it with a factor of 35 only for those employees which have age greater than 27 so we are going to use a new table called employees Corb for this as well so let’s see how to do it so I’ll give my comment as update subquery before we see the subquery let’s see what we have in the table employees Corb this is basically a replica of the employees table there you go it has the same records that our employees table has we are going to use both the employees table and the employees _ B table to update our records so I’ll write update employees set salary equal to let me bring this to the next line I’ll write set salary equal to salary multiplied by 35 where age in then I’ll write select age from my other table that is employees uncore B where age is greater than equal to let’s say 27 all right so let me run through this query and tell you what we are going to do so I’m going to update the records of the employees table specifically for the salary column so I’m checking if the age is greater than 27 then we’ll multiply the salaries of the employees with a factor of. 35 in the employees table let me just run this then we’ll see our output okay so it says 18 rows affected which means there are total 18 employees in the table out of the 20 employees whose age is greater than 27 now if you see I’ll write select star from employees you can see the difference in the salaries if I scroll to the right you can see these are the up updated salaries okay now if you check for employees who have an age less than or equal to 27 for example Marcus whose age is 25 his salary is the same we haven’t updated his salary then if you see if you have okay there is one more employee Maya we haven’t updated the salary of Maya because the age is less than 27 all right now let’s go back to our slides again as you can see we got the same output on our MySQL workbench now let’s explore how you can write subqueries with the delete statement now sub queries can again be used in conjunction with the delete statement so this is how the basic syntax of a delete query using subquery would look like you write delete from the table name where Clause the operator value followed by the inner query in within brackets so here we are going to use the employees table and what we are going to do is we’ll delete the employees whose age is greater than equal to 27 so let’s see how you can do it all right so I’ll give my comment as delete subquery so we’ll follow the syntax tax that we saw I’ll write delete from my table name that is employees I’ll write where age in and then I’ll start my inner query or the subquery I’ll write select age from employees uncore B where AG is let’s say greater than equal to 32 or let’s say the AG is less than equal to 32 close the bracket and I’ll give my semicolon let me first run the inner query for you so that you get an idea of the employees who are less than 32 years of age so there are nine employees in the table who have an age less than equal to 32 so we are going to delete the records if I run this okay it says nine records deleted now let’s print or display what we have in the employees table if I run this there you go so if you see the age table we have total 11 employees now and all their ages are greater than 32 because we have deleted all those employees who had an age less than equal to 32 okay so let me show you from the beginning what we did so first we used our subqueries database then we used our employees table so we started by looking at how you can use the subquery with a select statement this should be insert instead of update so we learned how to write an insert subquery we use two tables products and our a table moving ahead we saw how to write subqueries using the update command so we updated the salaries of the employee by a factor of. 35 for those who had an age greater than equal to 27 and finally we saw how to use the subquery using the delete statement so we deleted all those records for the employees whose age was less than equal to 32 so let’s start with what is normalization normalization in dbms is a method used to organize data within database to reduce repetition by breaking down large data sets into smaller more manageable tables and ensuring these tables are properly related normalization helps prevent issues like data rency data rency means the unnecessary repetition or duplication of data within a database for example when a same piece of data is stored in multiple places it can lead to inconsistencies and take up more storage space than needed for example Data rency before normalization you can see the table mentioned above where we have order ID customer ID customer name customer address product and quantity you might see some of the data which is being repeated again and again in the above table the customer address for John do is repeated three times let’s suppose if John do moves to a new address every occurrence of his address in the table must be updated if any instances missed during the update it leads to inconsistencies and errors can occur in the database the solution is reducing the rency through normalization let’s check it out how so you can see this is the normalized table we have created first is the normalized customer table and then we have the order table so what are the benefits of normalization the address for JN do is stored only once in the customer table if JN do address changes it needs to be updated in one place ensuring consistency through the database this reduces the risk of errors and maintains data Integrity the process involves multiple steps that transform data into a tab below format removing duplicates and establishing clear connections between different tables making the database more efficient and reducing problems like errors during data insertion updates or deletion let’s now discuss the types of dbms normal forms normalization rules are categorized into different normal forms the first one is one and if for a table to be in first normal form it must satisfy the four rules single valued Atomic attributes each column should contain only one value per row this means that there should be no repeating groups or arrays within a single column same domain values all values stored in a specific column should be of the same data type or domain for example if a column is meant to store dates all values in that column should be dates then we have unique column names each column in the table should have a unique name this ensures Clarity and avoids confusion when referring to a specific column then we have order of data which doesn’t matter the order in which rows are stored in the table should not affect the data or its Integrity let’s check the example of the first normal form consider the following unnormalized table customer ID customer name and the phone numbers as you can see the phone numbers are repeated twice the problems with the original table is the nonatomic values the four numbers column contain multiple phone numbers separated by commas which violates the atomicity rule of 1 andf converting to First normal form to bring this table into one and F we must ensure that each column contains only Atomic value this involves splitting the rows where there are multiple phone numbers as you can see we have splitted the data each row now has a single phone number ensuring that the phone number column contains Atomic value same domain names all the values in the phone number column are consistent in format and type all are phone numbers then we can see that the unique column names the colums customer ID customer name phone number which has unique name satisfying the requirement order of data the order in which the rules appear does not matter as the data’s meaning and integrity are preserved by applying these rules the table now confirms the first normal form eliminating any rency related to the four numbers and ensuring data is stored in a more organized and efficient manner let’s go through each of these database normal forms step by step with simple examples to help you grasp the concepts more easily let’s talk about the second normal form for a table to be in second normal form it must satisfy the following condition number one it must be in one and F number two no partial dependency every non key attribute should be fully dependent on the entire primary key not just part of it this rule applies primarily to tables with composite primary Keys example of second normal form is consider the following table that is in one NF the order ID product ID product name quantity and the supplier name the problems with this table is that the partial dependency the product name and the supplier name depend only on product ID not the entire bio primary key which is order ID and product ID this violates 2nf converting to Second normal form to bring the table into 2nf we separate the data into two tables to remove partial dependencies order table and the product table no partial dependency in the order table quantity is fully dependent on both order ID and product ID in the product table product name and supplier name are dependent only on the product ID this ensures that each each non key attribute is fully dependent on the primary key bringing the tables into 2 andf let’s now talk about the third normal form 3 andf for a table to be in third normal form it must satisfy the following condition number one it must be in 2 andf number two there should be no transitive dependency where non-key attributes depend on other non-key attributes rather than the primary key let’s check out the example of a third normal form consider the following table that is in 2nf the problems with the tnf table is that the transitive dependency the instructor name is dependent on the course name which is not directly on student ID or course ID and this violates 3 andf so how do we convert this into 3 andf to achieve 3 andf we split the table to remove the transitive dependency student course table and course table no transitive dependency now the student course table there are no non-key attributes depending on other non-key attributes the course Table stores the course and instructor information separately this structure eliminates transitive dependency uring the tables conform to 3 andf Let’s now talk about the boys called normal form which is bcnf bcnf is an extension of the third normal form 3nf a table is in bcnf if it is in 3nf and for every functional dependency a implies to B A should be a Super Key let’s check out the example of a boy Squad normal for bcnf so you can see this table here consisting of employee ID department and the manager the problem with this table is that the bcn a violation in this table Department determines manager but department is not a Super Key since employee ID is the primary key this violates bcnf so how do we convert this to bcnf to achieve bcnf we split the table to ensure that every determinant is a Super Key as you can see the employee table and the department table the super key requirement in the employee table employee ID is the primary key and in the department table department is now the primary key the decomposition ensures that every functional dependency is Satisfied by a Super Key meeting the requirements of bcnf let’s now talk about the fourth normal form which is 4nf a table is set to be in 4nf if it is in bcnf and has no multivalue dependencies so let’s consider an example of a fourth normal form consider a table where an employee can have multiple skills and work on multiple projects as you can see the employee ID skill and the project the problem with this table is that it is multivalue dependency an employee skill is independent of the project but both are stored in the same table this leads to multivalue dependency violating 4nf so in order to achieve 4nf we separate the skills and the projects into different tables the employee skill table and the employee projects table and now you can see that no multivalue dependency by separating the skills and the projects we eliminate multivalue dependencies ensuring the table conform to for and let’s now talk about the fifth normal form the employee skill table and the employee projects table so as you can see that no multivalue dependencies is there by separating the skills and the projects we eliminate multivalue dependencies ensuring the tables conformed to 4 and F now let’s talk about the fifth normal form which is 5 and f a table is said to be in fifth normal form if it is in forf and cannot be decomposed into any smaller tables losing information also known as joint dependency let’s consider an example of a fifth normal form this is a table here that records the relationship between suppliers parts and the project the problem with this table is that the join dependency the table has a complex relationship between suppliers parts and projects that can be decomposed further so how do we convert this into fifth normal form form in order to achieve 5 andf we break the table into smaller related tables the suppliers part table and the suppliers project table also Parts project table eliminating joint dependency by decomposing the table into three smaller tables we remove the complex relationship and eliminate the joint dependency ensuring the tables confirmed to 5 andf So currently I am on my MySQL workbench let me connect to the local instance so I’ll give my pass word I’ll click on okay all right so this is my my SQL workbench query editor so first we are going to learn subqueries let me give a comment and write subqueries all right so first of all let’s understand what a subquery is so a subquery is a query within another SQL query that is embedded within the where Clause from clause or having Clause so we’ll explore a few scenarios where we can use subqueries so for that I’ll be using my database that is SQL uncore intro so I’ll write my command use SQL uncore intro now this database has a lot of tables I’ll be using the employees table that is present inside SQL intro Let me just expand this and you can see here we have an employees table so let me first show you the contents within this table I’ll write select star from employees let me execute it okay you can see here we have the employee ID employee name age gender there’s date of join Department City and salary and we have information for 20 employees if I scroll down you can see there are 20 employees present in our table so let’s say you want to find the employees whose salary is greater than than the average salary in such a scenario you can use a subquery so let me show you how to write a subquery I’ll write the select statement in the select statement I’ll pass my column names that I want to display so the column names I want are the employee name then I want the department of the employee and the salary of the employee from my table name that is employees next I’ll use use a we condition where my salary should be greater than the average salary of all the employees so I’ll write salary greater than after this I’m going to write my subquery so I’ll give select average of salary from my table name that is employees and I’ll close the bracket and give a semicolon so what it does is first it is going to find the average salary of all the employees that are present in our table once we get the average salary number we’ll use this wear condition where salary is greater than the average salary number so the inside subquery let me run it first if I run this this gives you the average salary of all the employees which is $275,300 now I want to display all the employees who have salary greater than $75,500 so let’s run our subquery there you go so there are eight employees in our table who have a salary greater than the average salary of all the employees all right next let’s see another example suppose this time you want to find the employees whose salary is greater than John’s salary so we have one employee whose name is John let me run the table once again okay if I scroll down you see we have an employee as John you see this our employee ID 116 is John and his salary is $67,000 I want to display all the employees whose salary is greater than John’s salary so B basically all the employees who are earning more than $65,000 I want to print them so let’s see how to do it I’ll write select I want the employee name comma the gender of the employee I also want the department and salary from my table name that is employees I’ll write where salary is greater than I’ll start my opening bracket inside the bracket I’m going to give my inner query that is Select salary from employees where the employee name is John So within single quotations I’ll give John as my employee I’ll end with a semicolon so let me first run my inner query so this will give us the salary that John has which is $67,000 now I want the employees who are earning more than $667,000 so let’s run our subquery okay so you can see 12 rows returned which means there are 12 employees in our table who are earning more than $67,000 you see here all these employees have a salary greater than6 $7,000 okay now you can also use subqueries with two different tables so suppose you want to display some information that are present in two different tables you can use subqueries to do that so for this example we’ll use a database that is called classic models you can see the first database so let me use this database called classic Model models I’ll write use classic models now this database was actually downloaded from the internet there’s a very nice website I’ll just show you the website name so this is the website that is MySQL tutorial.org you can see here they have very nice articles blogs from where you can learn my SQL in detail so we have downloaded the database that is classic models from this website you see here they have a MySQL sample database if you click on this it will take you to the link where you can download the database so they have this download link which says download my SQL sample database and the name of the database is classic Models All right so we are going to use this classic models database throughout our demo session if I expand the tables section you can see see there are a lot of tables that are present inside this classic models database we have Cricket customers there’s employees office there’s orders order lines and many more so for our subquery we’ll be using two tables that is order details and products table first let me show you the content that is present inside the products table first if I run this you see here it says 110 rows returned which means there are 110 different products that are present in our table which has the product code the product name product line we have the product vendor description quantity and stock Buy price MSRP the other table we are going to use is order details which has the details of all the orders let me show you the records order details tables has okay so there are thousand records present in this table you have the order number the product code quantity ordered price of each item you have the order line number as well okay now we want to know the product code the product name and the MSRP of the products whose price of each product is less than $100 for this scenario we are going to use two different tables and we are going to write a subquery okay so if you see here in the order details table we have a column called price each I want to display the product code the product name and the MSRP of the products which have a price of each product less than $100 so the way I’m going to do is I’ll write select product code comma product name now one thing to remember that this product name is actually present inside our products table and product code is present in both the tables that is products and Order details here you can see this is the product code column comma MSRP which is present inside the products table again from my table that is products where I’ll write product code I’m going to use the in operator next I’ll write my inner query that is Select product code from my table order details where my price of each product is less than $100 let me run this okay so you can see there are total 83 products in our table which have a price less than $100 you can see the price here okay now we learn another Advanced Concept in SQL which is known as stored procedures I’ll just give a comment saying stored procedure okay so first let’s understand what is a stored procedure a stored procedure is an SQL code that you can save so that the code can be reused over and over again so if

    you want to write a query over and over again save it as a stored procedure and then call it to execute it so in this example I want to create a stored procedure that will return the list of players who have scored more than six goals in a tournament so I have a database is called SQL IQ these are a few databases that I’ve have already created so this database has a table called players if I expand the tables option you see we have a table called players and you can see the columns player ID the name of the player the country to which the player belongs to and the number of goals each player has scored in a particular tournament so I’ll write a store procedure that will return the list of top players who have scored more than six goals in a tournament so first of all let me Begin by using my SQL IQ database we’ll run it so now we are inside the SQL IQ database let me select star from players to show the values that we have in the players table you can see there are six players in our table we have the player ID the names of the players the country to which these players belong to and the goals they have scored so I’ll write a stored procedure so the stor procedure syntax is something like this it should start with a D limiter okay in the D limiter I’ll write Amberson erson next I’ll write create procedure followed by the procedure name let’s say I want to name my procedure as topor players next statement is begin after begin I’ll write my select statement I want to select the name of the player the country and the goals each player has scored from my table that is players where I’ll write goals is greater than six we give a semicolon then I’ll end my procedure with a d limiter that was done double Amberson next I’ll write D limiter and give a semicolon now the semicolon suggests this is a default DM there should be a space okay now let’s run our stored procedure there you go so you have successfully created our store procedure now the way to run a store procedure is you need to use the call method and give the procedure name that is topor players in our case with brackets and a semicolon let’s execute it okay there is some problem here so we made a mistake while creating a procedure the name of the column is goals and not go goal let me create that procedure again okay it says the procedure topor player already exists let’s just edit the procedure name instead of top player we’ll write it as top players and similarly we’ll edit here as well now let’s create it again okay now to call my procedure I’ll write call space followed by the procedure name which is topor players if I run this you can see we have two players in our table who have scored more than six goals so we consider them as the top players in a particular tournament all right now there are other methods that you can use while creating a stored procedure one of the methods is by using an in parameter so when you define an in parameter inside a stored procedure the calling program has to pass an argument to the stored procedure so I’ll give a comment stored procedure using in parameter all right so for this example I’ll create a procedure that will fetch or display the top records of employees based on their salaries so if we have a table in our SQL IQ database which is called employee details I’m going to use this table you can see we have the name of the employee the age sex then we have the date of join City and salary using this table I’ll create a procedure that will fetch or display the top records of employees based on their salaries and we’ll use the in parameter so let me show you how to do it I’ll write delimiter this time I’m going to use forward slash I’ll write create procedure followed by the procedure name let’s say SP for stor procedure sort by salary is the name of my procedure and inside this procedure I’ll give my parameter in I’ll create a variable V and assign a data type integer then I’ll write begin followed by my select statement where I’ll select the name age salary from my table name that is EMP details or employee details I’m going to order this by salary descending and I want to display limited number of Records so I’m using this limit keyword and my variable V which I created here here I end my select statement I end my stored procedure with forward slash and I’ll go back to my default delimiter that is semicolon all right so let me run this there should be a space here all right so let’s run this okay you can see we have successfully created our second stored procedure which is Spore sort by salary now you can also check whether the stored procedure was created or not here you have an option to see the stored procedures let me just refresh this and you can see we have three stored procedures that we have created so far one is Spore sort by salary the other two were topor play and topor players okay now let’s call our stor procedure I’ll write call space followed by the stored procedure name which is Spore sort by salary and inside this I’ll give my parameter which was actually V and this V we have used in limit let’s say I want to display only the top three records of the employees who have the top three highest salaries okay so let me run it there you go so ammy Sara and Jimmy were the top three employees who have the highest salary so you saw how you could use the in parameter in a stored procedure we created a variable and that variable we used in our select statement and we called our stored procedure and passed in that variable okay now instead of a select statement inside a stored procedure you can also use other statements let’s say update so I’ll create a stored procedure to update the salary of a particular employee so in this procedure instead of Select statement we’ll use the update command in this example we’ll use the in operator twice let me show you how to do it I’ll write my D limiter first which is going to be for slash then I’ll write create procedure my name of the procedure is going to be update salary and inside the update salary name I’ll write in and then temp underscore name which will be a temporary name variable and the type I’ll assign is varar 20 I’ll again use my in parameter I’ll write in next my other variable would be newcore salary and the data type would be float I’ll write begin and write my update command or update statement I write update table name that is employee details set salary equal to newcore salary where name is equal to my temporary variable that is tempore name so this is my update command and I’ll and the delimiter all right so let’s run this okay we have successfully created our stored procedure if I refresh this you can see I have my store procedure update _ salary okay now let’s say first of all I’ll display my record that are present inside employee _ details table okay so we have six rows of information let’s say you want to update the salary of employee Jimmy or let’s say Mary from 70,000 to let’s say 72,000 or let’s say 80,000 so I’ll call my store procedure that is update uncore for salary and this time I’m going to pass in two parameters the first parameter will be the employee name and next with a comma I’ll give my new salary that I want to so my employee name let’s say is Mary and the salary I want to be updated is let’s say $880,000 I’ll give a semicolon and I’ll run it you can see it says one row affected now let’s check our table once again there you go if you see this record for Mary we have successfully updated the salary to $80,000 now moving ahead we learn to create a stored procedure using the out parameter so I’ll give a comment stor procedure using out parameter Okay so so suppose we want to get the count of total female employees we will create total employees as an output parameter and the data type would be an integer the count of the female employees is assigned to the output variable which is total uncore emps using the into keyboard let me show you how to write a stored procedure using the out parameter so first I’ll declare my delimer to forward slash I’ll write create procedure followed by the procedure name it is going to be Spore count employees and inside this I’m going to give my out parameter and the variable name that is total uncore emps which is total employees and the data type will be integer next I’m going to write begin followed by my select statement that is Select I want the count of total employees and the output I’m going to put into my new variable that is total _ emps from my table that is empore details where sex is equal to F which means female I’ll give a semicolon next I’ll end it with the D limiter and I’m going to change the D limiter to a default D limiter that is colon so let me tell you what I’m doing here I’m creating a new stor procedure that is Spore count employees using this stored procedure I’m going to count the total number of female employees that are present in our table empore details so I’ve used my out parameter and I’m creating a new variable called total uncore emps the data type is integer here in the select statement I’m counting the names of the employees and the result I’m storing it in total _ emps I have used my wear condition where the gender of the sex is female so let’s run this okay so we have created our stored procedure let’s refresh this okay you can see we have our new stored procedure Spore count employees now to call it I’ll write call the name of the procedure that is countor Spore count employees within brackets I’ll pass in the param meter as at the rate fcor EMP I’ll give a semicolon then I’ll write select at the rate fcor EMP as female employees okay so as is an alias name let’s run this one by one first I’ll call my procedure and then we’ll display the total number of female employees you can see in our table we have three female employees all right now with this understanding let’s move on to our next Topic in this tutorial on Advanced SQL now we are going to learn about triggers in SQL so I’ll give a comment here triggers in SQL so first let’s understand what is a trigger so a trigger is a special type of stored procedure that runs automatically when an event occurs in the database server there are mainly three types of triggers in SQL we have the data manipulation trigger we have the data definition trigger and log triggers in this example we’ll learn how to use a before insert trigger so we will create a simple students table that will have the students role number the age the name and the students marks so before inserting the records to our table we’ll check if the marks are less than zero so in case the marks are less than Z our trigger will automatically set the marks to a random value let’s say 50 so let’s go ahead and create our table that is students all right so I’ll write create table student now this table will have the student role number the data type is integer we will have the age of the students again the data type is integer we have the names of the students so the third column would be name the data type would be variable or varying character size I’m giving it as 30 finally we have the marks as floating type so let’s create this table which is student so we have created our table now I’ll write my trigger command so trigger command will start with D limiter like how our usual stored procedures have next this time I’ll write create trigger then you you need to give the name of the trigger that is Mark underscore let’s say verify I’m going to use a before insert trigger so I’ll write before insert on my table name that is student next I’ll write for each row if new do marks is less than zero then we set new do marks equal to 50 so this is my condition first we’ll check before inserting if any student has marks less than zero will assign a value 50 to that student because usually the marks are not less than zero in any exam I’ll write end if semicolon and I’ll close the delimiter so this is my trigger command I’ll run it it says trigger already exists in this case we need to update the trigger name let’s say I’ll write marks _ verify uncore student for STD let’s run it again okay there is an error here because in our table the column name is Mark and not marks so here we need to change it as Mark instead of marks all right let’s run it okay so we have created our trigger now let me insert a few records to the student table so I’ll write insert into student I’ll write values it give the values as 501 which is the student role number the age is let’s say 10 the name is let say Ruth and the marks is let’s say 75.0 give a comma we’ll insert our second student record student role number is 502 age is 12 the name is let’s say mic and this time I’m purposely giving a value of minus 20.5 give another comma we’ll insert the third record for student role number 503 age is 13 the name is Dave and let’s say the marks obtained by Dave is 90 now we’ll insert our final record for student number 504 the age is 10 name I’ll enter as Jacobs and this time again I’m purposely giving the marks in negative 12 point let’s say 5 close the bracket and give a semicolon and I’ll run my insert statement okay so we have inserted four rows of information to our student table now let me run the select query I’ll write select star from student if I run this you see the difference there you go so originally we had inserted for 502 the marks was minus 20.5 and for 504 for Jacobs the marks was – 12.5 our trigger automatically converted the negative marks to 50 because when we created our trigger we had set our marks to 50 in case the marks were less than zero so this is how a trigger works now you can also drop a trigger or delete a trigger you can just write drop trigger followed by the trigger name in this case our trigger name is marks _ verore St I’ll just paste this here and if you run this it will automatically delete your trigger I give this as a comment okay now moving on now we are going to learn about another crucial concept in SQL which is very widely used this is known as views so views are actually virtual tables that do not store any data of their own but display data stood in other tables views are created by joining one or more tables I’ll give a comment as views in SQL okay now to learn views I’m going to use my table which is present inside classic models data datase now this database as I mentioned we had downloaded we had downloaded it from the internet so first of all let me write use classic models so I’ll switch my database first all right now we are inside classic models so here let me show you one of the tables which is called customers so I’ll write select star from customers okay I missed s here let’s run it again so this is my customer table which is present inside classic models database it has the contact last name the contact first name the customer name customer number we have the address State country another information now I’ll write a basic view command using this customer table the way to write is I’ll write create view followed by The View VI name which is cust _ details then you write as select I’m going to select a few column names from my original customer table which is this one so I need the customer name let’s say I need the phone number and the city so you have this information here you have the phone number and the city all right I’ll write from my table that is customers if I run this my view that is cust details will be created let’s run it there’s some error here because the name of the table is customers and not customer I’ll give an S and I’ll run it again all right so you can see we have created our view and to display the contents that are present inside our view I can write select star from followed by The View name that is custor details let’s run it there you go so we have the customer name the phone number and the City of the different customers that we have in our table all right now let’s learn how you can create views using joins so we’ll join two different tables and create a view so for that I’m going to use my products table and the products lines table I’m talking about the products table and the product lines table present inside classic models database so before I start let me display the records that are present inside the products table let’s run it so these are the different products you can see here now let’s see what we have in product lines table so we have the product line the text description and there’s some HTML description and image so I’ll create a view by joining these two tables and we’ll fetch specific records that are present in both the tables so let me first start by writing create view followed by The View name that is product underscore description as I’ll write select product name comma then I’ll write quantity in stock I also want the MSRP now these three columns are present inside the products table and next from the product l table I want the text description of the products so I’ll write from products table I’ll give an alas as P followed by Inner join my other table that is product lines as let’s say PL on the common column that is product line so P dot product line is equal to I’ll give a space PL do product line okay so here we have used an inner joint to fetch specific columns from both the tables and our view name is productor description let us run it all right so we have our view ready now let me view or display what is present inside our productor description view I like select star from productor description let’s run it there you go so we have the product name the quantity in stock MSRP and textual descriptions of the different products in the table okay now there are are a few other operations that you can perform let’s say you want to rename a view instead of productor description you want to give some other name so I’ll just give a comment rename description so to rename a description you can use the rename statement I’ll write rename table product underscore description Which is my old name I want to change this name to let’s say I’ll give vehicle description since all our products are related to some of the other vehicle so I’ll write vehicle description okay let us run it all right so here you can see I have renamed my view so here if I just refresh it and I’ll expand this you can see we have the Cur details view and we have the vehicle _ description view okay now either you can view all the views from this panel or you can use a command let’s say I’ll write display views is the comment now to show all the views you can use show full tables where table underscore type is equal to within single code I’ll write view so this is the command that will display all the views that are present inside a database there is some error here let’s debug the error this should be okay so instead of table types it should be table type equal to view let’s run it you can see the two different views that we have one is customer details another is vehicle _ description okay now you can also go ahead and delete a view for that you can use the drop command so I’ll write drop view followed by The View name let’s say I want to delete customer _ details or custor details view I’ll write drop View ccore details let’s run it you can see here we don’t have the custor details view anymore all right now moving to our final section in this demo here we will learn about Windows functions Windows functions were Incorporated in my SQL in the 8 .0 version so Windows function in my SQL are useful applications in solving analytical problems so using the employees table present inside my SQL intro database so we’ll find the total combined salary of the employees for each department so first let me switch my database to SQL undor intro database I’ll run it okay and display my table that is employee so here we have 20 employees in our table using this table we are going to find the combined salary of the employees for each department so we will partition our table by department and print the total salary and this we are going to do using some windows functions in MySQL so I’ll write select I want the employee name the age of the employee and the department of the employee comma next I’ll write the sum of salary over I want to partition it by department so I’ll write Partition by Department which is D and I’ll give an alas as total salary so that it will create a new column with the name total salary from my table that is employees the output will be a little different this time let’s execute it and see the result there you go so here we have created another column in our result that is total salary and for each of the employees and the respective departments we have the highest salary so in finance the highest salary of one of the employees was $155,000 similarly if I come down we have the highest salary from HR if I scroll further we have the highest salary from it marketing product sales and the tech Team all right now we’ll explore a function which is called row number now the row number function gives a sequential integer to every row within its partition so let me show you how to use the ru number function I’ll write select rore number function over my column would be salary so I’ll write order by salary I’ll give the alas as ronom give a comma and I want to display the employee name and the salary of the employee from my table that is employees and I’ll order by salary so let’s see how our row number function will create sequencial integers okay you can see here we have a row number column and we have successfully given row numbers to each of the records you can see it starts from one and goes up till 20 okay now this row number function can be used to find duplicate values in a table to show that first I’ll create a table I’ll write create table let’s say I’ll give a random name that is demo and let’s say we have in this table the student ID which is of type integer and we have the student name which is of type varar the size is 20 I’ll create the small table with a few records let’s create this table first now we are going to insert a few records to our demo table so I’ll write insert into demo values I’ll give one1 the name is Shane give a comma I’ll insert the second student name one2 the name is Bradley we give a comma this time for 103 we have two records let’s say the name of the student is her give a comma I’ll copy this and we’ll paste it again so we have duplicated 103 next we have 104 for the name of the student let’s say is Nathan then again let’s say for the fifth student which is Kevin we have two records I’ll copy this and I’ll paste it here let me give a semicolon and we’ll insert these records to our table demo all right now let me just run this table for you I’ll write select star from demo if you see this we have a few information that are duplicated in our table that is for student ID 103 and student ID 105 now I’m going to use my row number function to find the duplicate records present in my table I’ll write select student uncore ID comma student uncore name I’ll give another comma and write rore number over within brackets I’ll write Partition by store ID comma store name okay then I’ll write order by store ID close the bracket I’ll give an alas as rum from my table that is demo let’s just run it you can see here okay let me just delete n from here and do it again all right if you see here there is just one student in the name Shane we have one student in the name Bradley but here if you see for her the second record it says two which means there are two records for H and if I scroll down there is one record for Nathan and there are two records for Kevin which means Kevin is also repeated okay now we are going to see another Windows function that is called rank function in my SQL so the rank function assigns a rank to a particular column now there are gaps in the sequence of ranked values when two or more rows have the same rank so first of all let me create a table and the name of the table would be a random name we’ll give it as let’s say demo one and it will have only one column let’s say variable a of type integer we’ll create this table first okay now let’s go ahead and insert a few records to our table which is demo one so I’ll write value 101 102 let’s say 103 is repeated I’m doing this purposely so that in the output you can clearly distinguish what the rank function does next we have 104 105 we have 106 and let’s say 106 is also repeated finally we have 107 okay let me insert these values to my table that is demo one okay this is done now if I write select Vore a and use my rank function I’ll write rank over then I’ll order by my variable that is Vore a as an alas name let’s a test rank from my table that is demo one let me execute this and show you how the rank function works if I run this there you go so here if you mark So for variable a101 the test rank is 1 for 102 the test rank is two but for this value which is 103 the test rank is repeated because there was a repetition for 103 so we have skipped the rank four here for 104 the rank is 5 now for 105 the rank is 6 now for 106 again since the record was repeated twice we have skipped the eighth Rank and our rank function assigned the same value which is 7 for 106 and for the last value 107 the rank is 9 all right now moving ahead we’ll see our final Windows function which is called first value so first value is another important function in my SQL so this function Returns the value of the specified expression with respect to the first row in the window frame all right so what I’m going to do is I’m going to select the employee name the age and salary and I’ll write first underscore value which is my function and pass in my employe name and then I’ll write over order by my column that is salary descending I’ll give an alas as highest uncore salary from my table that is employees so let me run this and see how the first underscore value function works all right so in our table Joseph was the employee who had the highest salary which was $115,000 so the first value function populated the same employee name throughout the table you can see it here now you can also use the first uncore value function over the partition so let’s say you want to display the employee name who has the highest salary in each department so for that you can use the partition I’ll write select _ name comma I want the department and the salary comma I’ll use my function that is first underscore value follow by the name of the employee inside my first value parameter I’ll write over here I’m going to use partition I’m going to partition it by department since I want to know the employee name who has the highest salary in each department and I’m going to order by salary descending and I’ll give my alas again as highest salary from my table that is employees so let’s run this and see the difference in the output okay so as you can see here we have the employee who had the highest salary from each department so for finance Jack had the highest salary from HR it was Marcus similarly in it it was William if I scroll down for marketing it was John for product it was Alice who had the highest salary similarly in sales we had Joseph and in Tech we had Angela so this is how you can use the first uncore value function using partition all right so that brings us to the end of this demo session on our tutorial so let me just scroll through and show you what we did from the beginning first we learned about subqueries in SQL so we initially wrote a simple subquery and then we used our classic models database which was downloaded from the internet I’d also shown you the link from where you can download this database here we used two different tables and we performed a subquery operation we learned how to create stored procedures so we learned how you can use the in operator or the in parameter as well as the out parameter in store procedure after stored procedure we learned another crucial Concept in SQL which is called triggers now triggers are also special kind of store procedures so we saw how to write a before insert trigger you can see it here next we learned how to delete a trigger we also saw how to work with views in SQL so views are basically virtual tables that you can create from existing tables we also saw how you can use views using two different tables and an inner join and we learned how to display views how to rename view names how to delete a view and finally we explored a few Windows function in this tutorial we will learn how to work with databases and tables using SQL with python to do this demo we will be using our jupyter notebook and the MySQL workbench you can see it here so we will write our SQL queries in the jupyter notebook with python like syntax if you don’t have MySQL or jupyter notebook install so please go ahead and install them first while installing the MySQL workbench you’ll be asked to give the username and password let me show you so I am on my MySQL workbench so once you connect it will ask for the username and the password so I’ve given my username as root and password you can give while installing it we will be using the same user ID or the username and the password to make our connection so let’s get started with our Hands-On demonstration part first and foremost let me go ahead and import the necessary libraries I’ll give a comment as import libraries all right so first I’ll import MySQL do connector next from MySQL doc connector I’m going to import my error method or the error module next I want to import pandas as PD so let’s run this okay there is some error here this should be capital E and not small all right you can see I have imported my important libraries now I’m going to create a function that will help us create a server connection so I’ll write my userdefined function by using the DF keyword I’ll write create underscore Server uncore Connection this is going to be my function name and it will take in three parameters first is the host name next is the username and then we have the user password all right I’ll give a colon and then in the next line I’m going to Define a variable which is going to be connection and I’ll assign it to a value called none now we’ll be using exception handling techniques to connect to our MySQL server the tri block lets you test a block of code for errors and the accept block will handle the errors so I’ll write try and give a colon and then I’m going to reassign the connection variable to a method which is MySQL do connector do connect now this MySQL connector. connect method sets up a connection so it establishes a session with the MySQL server if no arguments are passed it uses the already configured or default values so here we are going to pass in three parameters the first is the host name I’ll write host equal to host name which is hostor name name I’ll give a comma then I’ll write user equal to user uncore name next will be my password and I’ll assign the value user _ password all right now I’m going to use a print statement and write mySQL database connection successful after this I’ll give my accept blog so I’ll use the keyword accept here I’ll write error as err give a colon and then I’m going to use the print statement here I’m going to use some print formatting techniques using the F letter I’ll write error colon and I’ll use curly braces give VR and then I’ll close the double codes after this I’m going to return my connection all right let me give a comment here we are going to assign our password so we need to put our MySQL terminal password so this password you assign it while installing MySQL workbench I’ll write PW and I’ll give my password which is simply at the rate 1 2 3 4 5 and then I’m going to give my database name so I’ll give database name here I’m going to write DB equal to this is the database I want to create which is going to be MySQL python let me just scroll this down okay now I’ll say connection equal to I’ll pass in my user defined function name which is create server connection and the parameters which are going to be Local Host that is my host name my username which is root and then I’ll give PW which is my password that is exact L simply at the rate 1 2 3 4 5 let’s just run it now okay there is an error here we need to remove this double quotation all right made another mistake here this this should be root okay you can see here my SQL database connection successful all right next we are now going to create a database that is MySQL _ python so I’ll give a comment create MySQL uncore python database again to create this database I’m going to create another user defined function using the DF keyword I’ll write the function name as create database passing the parameters as connection comma query give a semicolon and in the next line I’ll write cursor equal to I’m going to make the connection so I’ll write connection dot cursor and I’ll give the parenthesis so this mysql’s cursor of MySQL connector python is used to execute statements to communicate with the mySQL database the MySQL cursor class initiates objects that can execute operations such as the MySQL statements okay next I’m going to again use my try and accept block so I’ll write try give a coolon and here I’m going to use cursor do execute within that I’m going to pass in my query next I’ll use a print statement and the message I’m going to display is database created successfully after this I’m going to write my except block I’ll write accept error as err give a colon and then I’ll use a print statement I’ll write print I’ll use the formatting again error colon and I’ll write within single codes I’ll give curly braces err and then I’ll close the double codes next let’s use the variable create underscore database underscore query and here I’m going to write my SQL query to create the database so I’ll write create database and followed by that I’ll give my database name which is going to be MySQL python okay after this I’ll call my function which is create database and I’ll pass in the parameters the first one is connection and next the query qu is create _ database _ query let me just copy it and I’m going to paste it here all right so what I’m doing here is I am creating a new function that is to create a new database with the name MySQL undor python which you can see it here now this function takes in two parameters connection and query I’m using the connection. cursor function which is often used to execute SQL statements using Python language and then I have created my try and exer blocks so this Tri block statements will try to create my new database which is MySQL python in case it fails to create the new database the exer block will work so here I’m writing my SQL query to create a new database which is create database followed by the database name and I’m assigning it to a variable which is create data datase query and then I’m calling my function create database and passing in the two parameters connection and the query all right so let’s just run it all right you can see here it has created my database successfully now you can verify this by checking the MySQL workbench or the MySQL shell you can see on the MySQL workbench here on the left panel under schemas there is a database called MySQL python let me just expand it now we haven’t created any table so it’s not showing it now the next step we are going to connect to this database so let’s go ahead and connect to our database that we have just created I’ll write the comment as connect to database now to connect to a database I’m again going to create a userdefined function using the DF keyword I’ll write create underscore DB which is for database _ connection and the parameters it will take is the host name followed by the username then we have the user password and finally we have the database name I’ll give a colon in the next line I’m going to create my variable which is connect connection and then I’ll assign it to a value none after this I’m going to use my exception handling techniques so I’ll write my tri block first I’m going to reassign my connection variable using the MySQL connector method so I’ll write MySQL do connector do connect so this this method we’ll take in the parameters so first it will take the host name I’ll write host equal to hostor name I’ll give a comma next it will take the usern name so user equal to user name another comma next it will take the user password I’ll use pass WD equal to user uncore password we give another comma and this time is going to be the database name so I’ll write database equal to dbor name now let’s use the print statement and and the message we are going to print is mySQL database connection successful all right finally we’ll write my accept block I’ll write accept error as err give a colon and then I’ll use the print statement f F within double Cotes I’ll write error colon within single Cotes curly braces I’ll write err and we’ll close the double quotes finally this function will return the connection value all right let’s run it and there you go it has run successfully so we have connected to our database now it’s time for us to execute SQL queries I’ll give another comment saying execute SQL queries all right now to execute our SQL queries I’ll use another user defined function which is execute underscore query and I’ll pass in the parameters as connection and query give a colon I’m going to write cursor equal to connection do cursor now this is used to establish a connection and run SQL statements next we’ll use the try and accept block so I’ll write try cursor dot execute this will take in one parameter which is going to be my query and then I’ll write connection do commit which is another method now let’s use the print statement so I’ll write print let’s say the message would be query was successful and then we’ll write our accept block which is accept if the tri block doesn’t work through an error using the print statement within double codes inside the inside the curly braces I’ll write err and close the double codes all right so let’s run it okay so we have successfully created our various functions that we needed to create a database establish a connection and to execute our queries all right now it’s time for us to create our first table inside the MySQL _ python database so to do that I’m going to write my create command in SQL so first we are going to assign our SQL command to a python variable using triple codes to create a multi-line string so let me show you how to do that I’ll write my variable name which is going to be create orders table it is always recommended to use relevant variable names to make it more readable and now I’m going to use triple codes so the triple quote will ensure I can create my multi-line string inside the triple quote I’m going to write my create command which is create table here I’m going to create an orders table first and inside the orders table I’m going to create my column names the First Column would be the order ID it is going to be of type integer and I’ll assign this order ID as my primary key column we’ll give a comma next the second column would be customer underscore name the customer name column would be of type varing character so I’ll write varar and I’ll give a size of 30 and this is also going to be not null moving ahead my fourth column would be the product name column so I’ll write productor name product name will be of type varing character the size is let’s say 20 and it is also not null next I’m going to create my fourth column which is the date on which the item was ordered or the product was ordered so I’ll write date ordered the data type will be date next I’ll create a quantity column to keep track of the number of quantities that were ordered this is of type integer my next column would be unit price which will basically have information about the price of each unit of product unit price can be of type float and finally I’ll have the phone number of the customer I’ll write phone number phone number can be kept as of type varing character I’ve have assigned a size of 20 now let’s give a semicolon and we’ll close the the triple codes all right so this is how the syntax would look like next to run this we are first going to call our create DB function so let me give a comment as connect to the database I’ll write connection equal to create _ dbor connection my parameters would be my host name which is Local Host my username which is root comma my password and then my database name which is MySQL python so I’ll write just DB all right finally let’s execute this query using the execute underscore query function that we had created earlier this takes in two parameter the first one is connection followed by the variable name which is create orders uncore table let us run it okay there is some error here let’s see what’s the error okay so here we have put four double code this should be triple codes now let’s run it okay there is another here let’s debug it it says name cursor not defined let me just roll it to the above cell if you see here in our execute underscore query function instead of cursor I have written cursor so R is missing let’s redun this and now let’s run this again there you go you can see here my SQL database connection successful even our query was also successful now if you want to recheck if the table that is orders was created or not you can check it on the MySQL workbench so let me show you how to do it so I am on my MySQL workbench and under MySQL python database you have something called as tables let me just right click and I’ll select refresh all there you go you can see this Arrow just click on this arrow and here you can see we have a table called orders so we have created our table called orders now you can check the columns as well you have the order ID you have the order ID the customer name product name ordered date quantity unit price and phone number now it’s time for us to insert a few records to this table which is orders now to insert records I’ll give a comment as insert data I’ll start with the variable name let’s say the variable name is data underscore orders I’ll give triple Cotes next I’ll write my insert into command so I’ll write insert into my table name that is orders for followed by values and now I’ll start entering my records for each of the rows so first I’ll give one1 which is the order ID then I’ll give the customers’s name let’s say Steve and the product he had ordered is let’s say laptop then I’ll give my date in which the item was ordered let’s say it is 2018 I’ll choose 06 as the month and the date is let’s say 12 we give another comma this time we’ll pass in the quantity which is two let’s say the price of each laptop was $800 and we’ll give a phone number this is random let’s say 62 9 3 7 3 0 Let’s see 802 all right similarly I’m going to insert five more records of different customers and their items that they have purchased to this table orders so here on my notepad I have my rest of the five records let me just copy it and we’ll paste it in the cell here this will save us some time okay let me recheck if everything is fine I’ll give a comma here all right so we have six customers in our table which have their customer IDs from 101 to 106 you have Steve jaw Stacy Nancy Maria and Danny you have the different items they have purchased laptop books trousers t-shirts headphones and smart TV is the date on which they had ordered this item the number of quantities they had ordered and then we have the unit price and some random phone numbers so let’s create the connection now I’ll write connection equal to I’ll write create undor dbor connection then I’ll going to give my same parameters let me just copy it from the top is Local Host the host name root is my username then we have password and the database name and then I’ll use the same query as above which is execute query I’ll copy this paste it here and instead of of create orders table variable I’ll put as data _ orders so this will store my insert into command you can see the variable I’ve used here is dataor orders now it’s time let’s just run it all right there was some mistake here let’s debug it again this should be triple quotes and not four now let me rerun it again there you go you can see here my SQL database connection successful and my query was also successful now we’ll create another user defined function which will help us read query and display the results so I’ll write my function name as DF read uncore query this will take in two parameters connection and query then I’ll write cursor equal to connection do cursor I’ll put my result as none and then I’ll use my try and except block I’ll write try cursor dot execute this will take in one parameter which is query and then I’ll give another variable which is result equal to cursor dot fetch all now this fetchall method will return all the results in the table I’ll write return result next we’ll use the accept block so I’ll write accept error as ER give a colon and I’ll use my print statement just scroll this down I’ll use my formatting F error give a colon followed by a space within single Cotes inside curly pess I’ll give ER and close my double Cotes let’s run it all right so now we are all set now we are going to use our select Clause having whereby then we’ll see how to use Auto by Clause some inbuilt functions we’ll update some records delete some records and do a lot of other stuff so let’s start with our first query so our first query is going to be using the select statement all right so suppose I want to display all the records that we have inserted into our ords table so the way to do is I’ll assign my query to a variable let’s say q1 I’ll give triple quotes within triple quotes I’ll write select star from orders we give a semicolon followed by the triple codes now we’ll establish the connection so let me just go to the top and I’ll copy this line which is to connect to our database I’ll paste it here now we’ll create a variable called results that will store the result of this query and we are going to assign this variable to our function that is read query and this read query will have two parameters the connection and the variable name which is q1 for the query next to display I’m going to use a for Loop I’ll write for results for result in results print I’ll say result now we are done let’s just run this query there you go you can see here we have successfully printed all the rows in our table which is orders you can see we have six records in total now we are going to explore a few more queries so let me just copy this and we are going to edit in the same query I’ll paste it here next let’s say you want to display individual columns from the table and not all the columns so let me let me create the variable Q2 now instead of star I’m going to display only the customer name and let’s see the phone numbers of the customer so I’ll write phone uncore number all right the rest all Remains the Same let me just recheck it and here instead of q1 we’ll put Q2 and let’s run this cell all right you can see here now we have displayed only two columns the First Column is the customer name and then we have the respective phone numbers okay now let me just paste that query again now we are going to see how you can use an inbuilt function that is in our table we have the order date and from the order date we are only going to display the different ear that are present in the order date so to do that I’m going to use the year function I’ll edit this query instead of q1 I’ll make it Q3 and here I’m going to write select here which is my function name from my column which is date ordered from orders and here I’ll change this to Q3 q1 Q2 Q3 are basically query 1 query 2 and query 3 let’s run it there you go so we have successfully extracted the different years present in the order date column now if you want to display the distinct or the unique dates present in the column you can use the dextin keyword in the select statement so the way to do it is I’ll write select distinct give a space the rest of the query Remains the Same and here Q3 I’ll write Q4 I’ll make this as Q4 let’s run it you can see 2018 and 2019 are the unique year values that are present in the order date column okay now moving ahead let’s write our fifth query and this time we are going to explore how you can use the wear Clause so I’ll change this to Q5 before I write my query so let’s say you want to display all the orders that were ordered before 31st of December 2018 so to filter this we are going to use the wear Clause so I’ll write write select star from orders next I’ll write where my date underscore ordered is less than within course I’ll give my date value which is 2018 December 31st so all the items or the products that were ordered before 31st of December 20 18 will be displayed so let’s run it all right you can see here there are three orders in our table which have been ordered before 31st of December now moving ahead we want to display all the orders that were made after 31st of December so here what you can do is I’ll just copy the above query again I’ll copy this line so instead of less than 31st of December 2018 I’ll make it as greater than so every order that was placed after 31st of December will be displayed if you run it so you can see here there are three orders in our table which were ordered after 31st of December 2018 now moving ahead let’s write a seventh query now let’s see how the autoby Clause Works in SQL so you can filter your results based on a particular column or sort it based on a particular column so this is going to be my query 7 I’ll write it from scratch again let’s say you want to display all the columns from the table so I’ll write select star from orders then I’m going to use order by unit price I’ll give a semicolon let’s run this query and see the output now if you see the result here and you mark the unit price column the result has been ordered in ascending order of unit price you see here it starts with the lowest price and then goes on with the highest price towards the end if you want to order it in descending order you can use the keyword Dees C so this will ensure your top or the most expensive products appear at the top and the least expensive products appear at the bottom all right next now let’s see how you can create a data frame from the given table so as you know using jupyter notebook and pandas you can create data frames and work on it very easily so with this table also we can create our own data frame so for that let me create an empty list first I’ll write from DB equal to I’ll assign this as an empty list so we are going to return a list of lists and then create a pandas data frame next I’ll write my for Loop I’ll write for result in results I’ll assign result to list of results so I’m converting the result into a list and then I’m going to append it to the empty variable or the empty list which is from DB do append I’ll append the result to my empty list next we need to pass in the column now that will be part of our data frame so I’ll write columns equal to this column I’ll pass it within a list so I’ll give my first column as order ID then we have the customer name next I have my product name then I have the date on which it was ordered give a comma then we’ll have the quantity column let me write it in the next line next we have the unit price column and finally we have the phone number column so I’ll write within double quotes phone number and this we are going to assign it to a data frame so I’ll be using PD do data frame which is my function to convert a list into a data frame my variable I’m going to pass this from _ DB and I’ll write my next argument is columns equal to my variable name that is columns finally let’s display the data frame which is DF all right so here I’m creating a empty list first and then I am creating a for Loop and I’m appending the results to my empty list here you can see I have created my column list and using pd. data frame I’m converting the list into a data frame if I run this this is append and not append all right you can see we have our data frame ready this is the index column it starts from zero onwards and then we have the different column names okay now let’s see how to use the update command now suppose you want to change the unit price of one of the orders you can use the update command so the way to do it I’ll first create my variable let’s say update and I’ll give three codes or triple codes then I’ll use my update command which is update followed by the table name that is orders next I’ll write set let’s say unitor price if you see this let’s say I want to set the unit price of trousers from $50 to let’s say $45 I want to update this particular record so I’m going to write set unit price column equal to $45 where the order ID equal to 103 so this query will update the third row in our table which is order ID 103 so it will update from $50 to $45 I’ll close the triple quotes and now I’ll use the connection queries again let me just paste it here all right I’ll delete these three lines of code and instead of that I’ll put execute underscore query and this will take into parameters as always which is going to be connection followed by the variable name that is update let’s run it you see here it says mySQL database connection successful query was successful now you can recheck that to do it let me just go to the top and we’ll just copy our first query which is q1 I’ll copy this and I’ll paste it here let me just rename this now this will be Q8 and I’ll change this as well I’ll write select star from orders where my order ID equal to 103 let’s see the unit price of 103 now you can see here instead of 50 now we have updated it to $45 all right now the last command we are going to say is how you can delete a record from the table I’ll write delete command as my comment now to delete a query I’ll first give my variable name which is delete uncore order and I’ll pass in within triple quotes next I’ll write my delete query which is delete from my table name that is orders then I’ll give my we Clause where let’s say I want to delete my order ID 105 let me just go to the top and explain you again so if you see this we want to delete the order ID 105 which was for customer name Maria and she had ordered headphones we want to completely remove this particular record so I have my delete query ready now let me just create my connection and display the results so I’ll go to the top and I’ll copy this connection command which also has the execute query command and I’ll paste it here and I’m going to make a change here instead of update we’ll write delete underscore order everything looks good let’s just run it you can see our query was successful and now if you want to print it let me just show you I’ll just copy this we’ll paste it here I’ll make this as q9 I want to verify if my order ID 105 was deleted or not instead of this statement I’ll write select star from orders and here I’ll change this to q9 if I run this you can see it here you can Mark order ID 105 was deleted and it no more appears in this table all right so this brings us to the end of the demo session on SQL with python let me just scroll you through what we did so first we imported the important libraries MySQL connector then we imported the error function then we imported pandas using PD we learned how to create a server connection to mySQL database we created a new database that is MySQL Python and now we connected to that database we created a function to execute our queries we saw how you can write a create table command then we inserted a few records to our orders table we created a read uncore query command to read the queries and display the results then we started exploring our different SQL commands one by one we saw how to use select query then we selected a few individual columns from our table followed by using a inbuilt function which was ear then we saw how to use the distinct keyword after that we used our wear Clause to filter our table based on specific conditions we saw how to order your results based on a particular column then we saw how you could convert the table into a data frame using pd. dataframe function finally we learned how to use the update command and the delete command postl is a very popular and widely used database in the industries in this tutorial we will learn post SQL or post chis SQL in detail with an extensive demo session so in today’s video we will learn what post chis SQL is and look at the history of postris SQL we will learn the features of postris SQL and jump into performing postris SQL commands on the SQL cell and PG admin so let’s begin by understanding what is post SQL postc SQL is an open-source object relational database management system it stores data in rows with columns has different data attributes according to the DB engines ranking postris SQL is currently ranked fourth in popularity amongst hundreds of databases worldwide it allows you to store process and retrieve data safely it was developed by a worldwide team of volunteers now let’s look at the history of postr sequel so in 1977 onwards the Ingress project was developed at the University of California Berkeley in 1986 the post Chris project was led by Professor Michael Stonebreaker in 1987 the first demo version was released and in 1994 a SQL interpreter was added to postris the first postris SQL release was known as version 6.0 or 6.0 on January 29 1997 and since then postr SQL has continued to be developed by the post SQL Global Development Group a diverse group of companies and many thousands of individual contributors now let’s look at some of the important features of postest SQL so postest SQL is the world’s most advanced open source database and is free to download it is compatible as it supports multiple operating systems such as Windows Linux and Macos it is highly secure robust and reliable postp SQL supports multiple programming interfaces such as C C++ Java and python postp SQL is compatible with various data types it can work with Primitives like integers numeric string and Boolean it supports structured data types such as dat and time array and range it can also work with documents such as Json and XML and finally postris SQL supports multiversion concurrency control or mvcc now with this Theory knowledge let’s look at the post SQL commands that we will be covering in the demo so we will start with the basic commands such as select update and delete we will learn how to filter data using where clause and having clause in SQL we will also look at how to group data using the group by clause and order the result using the order by Clause you will learn how to deal with null values get an idea about the like operator logical operator such as and and or we will also explore some of the popular inbuilt mathematical and string functions finally we’ll see some of the advanced concepts in postris SQL that is to write case statements subqueries and user defined functions so let’s head over to the demo now okay so let’s now start with our demo so first we’ll connect to post SQL using psql cell so here under type here to search I’ll search for psql you can see this is the SQL cell I’ll click on open let me maximize this okay so for Server I’ll just click enter database I’ll click enter port number is already taken which is 5432 I hit enter username is already given and now it is going to ask for password so here I’ll give my password so that I can connect to my post SQL database so it has given us a warning but we have successfully connected to post SQL all right so now to check if everything is fine you can just run a simple command to check the version of post SQL that we have loaded so the command is Select version with two brackets and a semicolon I’ll hit enter okay you can see the version post SQL 13.2 okay now let me show you the command that will help you display all the databases that are already there so if I hit slash L and hit enter it will give me the list of databases that are already there so we have post SQL there’s something called template 0o template 1 and we have a test database as well okay now for our demo I’ll create a new database so first I’ll write create space database and I’ll give my database name as SQL uncore demo I’ll give a semicolon and hit enter you see we have a message here that says create database so we have successfully created our SQL demo database now if you want to connect to that database you can use back/ c space SQL uncore demo there you go it says you are now connected to database SQL demo so here we can now create tables we can perform insert operation select operation update delete alter and much more now I’ll show you how to connect to post SQL using PG admin so when you install the post SQL database you will get the SQL cell and along with that you also have the PG admin so I’ll just search for PG you can see here it has prompted PG admin I’ll click on open this will open on a web browser you can see it has opened on Chrome and this is how the interface of PG admin looks like it is a very basic interface so on the top you can see the files we have object this tools and we have the help section as well and here you have dashboard properties SQL statistics dependencies dependence and here on the left panel you have servers let me just expand this so it will connect to one of the databases all right so if I go back you see when I had run back/ L to display the databases it had shown me post SQL and test now you can see here we have the post SQL database and the test database all right now we also created one more database which was SQL demo so let me show you how to work on this PG admin and the query tool all right so I’ll right click on SQL demo and I’ll select query tool I’ll just show you how to run a few commands on the query tool so let’s say you want to see the version of post SQL that you are using so you can use the same command that we did on psql Cell which is Select version closed with brackets and a semicolon I’ll select this and here you can see we have the execute button so if I hit execute or press F5 it will run that query you can see we have the output at the bottom and it says post SQL 13.2 compiled by visual C++ it has the 64-bit system okay now let me tell you how to perform a few basic operations using postr SQL commands so here let’s say I’ll write select 5 into 3 I’ll give a semicolon select this and hit F5 so this will run the query and it returns me the result that is the product of 5 and three which is 15 similarly let’s edit this let’s say I’ll write 5 + 3 + let’s say 6 I’ll select this and hit F5 to run it it gives me the sum of 5 + 3 + 6 which is 14 now the same task you can do it on this cell as well let me show you how to do it here so let’s say I’ll write select let’s say I want to multiply 7 into let’s say 10 you know the result it should be 70 if I hit enter it gives me 70 now this question mark column question World we’ll deal with this later all right let me go back to my PG admin again let me do one more operation let’s say this time I’ll write select 5 multiplied by and within brackets I’ll write 3 + 4 I’ll give a semicolon so what SQL will do is first it will evaluate the expression that is there inside the bracket that is 3 + 4 which is 7 and then it will multiply 7 with 5 now let me select this and I’ll hit execute so you can see 7 * 5 is 35 all right now we’ll go back to our shell and here I’ll show you how to create a table so we are going to create a table called movies on the cell that is psql cell so here we will learn how you can create a table and then you can enter a few data into that table all right let me just scroll down a bit okay so my create command goes something like this so I’ll write create table followed by the table name that is movies next my movies table will have a few columns let’s say I want the movie ID after the column name we need to give the data type so movie ID I’ll keep it as integer so integer is one of the data types that is provided by postr SQL next my second column the table would be the name of the movie so I’ll write moviecore name so all the variables or the column names should be as per SQL standards so there shouldn’t be any space between the column names so I have used underscore to make it more readable so my movie name will be of type varar or variable character or varing character and I’ll give the size as 40 so that it can hold 40 characters maximum next my third column will have the genre of the movie so I’ll write moviecore joner again joner is of type barar I’ll give the size as let’s say 30 and my final and the last column will have the IMDB ratings so I’ll write IMDb underscore ratings now the ratings will be of type real since it can have floating or decimal point values if I close the bracket I’ll give a semicolon and I’ll hit enter there you go so we have successfully created a table called movies now let me go back to my PG admin all right so here I have my database that is SQL demo I’ll just right click on this and click on refresh now let me go to schemas I’ll just scroll down a bit here under schemas we have something called as tables let me expand this okay so you can see we have a table called movies in the SQL demo database now and here you can check the columns that we have just added so our movies table has movie ID movie name j and readings all right now there is another way to create a table the previous time we created using the SQL cell now I’ll tell you how to create a table using the PG admin so here under tables I’ll right click and I have the option to create a table so I’ll select table okay so it’s asking me to give the name of the table so this time we are going to create a table called students so I’ll write my table name as students all right these will be default as it is now I’ll go to the columns tab so here you can create the number of columns that you want so you can see on the right I have a plus sign I’ll just select this so that I can add a new row so my first column would be let’s say the student role number I’ll write student underscore RO number again the column name should be as per SQL standards the data type I’m going to select is integer all right now if you want you can give these constraints such as not null so that student R number column will not have any null values and I’ll also check primary key which means all the values will be unique for role numbers all right now if you want to add another column you can just click on that plus sign and let’s say this time I want to give the student name as my second column so I’ll write student underscore name student name will be of type let’s say character wearing if you want to give the length you can specify the length as well let’s say 40 I’ll click on the plus sign again to add my final column the final column would be gender so gender I’ll keep this time as type character okay now you can click on save so that will successfully create your students table there you go so here on the left panel you can see earlier we had only one table that was movies and now we have two tables so one would be added that was students so if I expand this under columns you can see we have the three columns here student rule number student name and gender you can also check the constraints it will tell you if you have any constants so you can see it says students rule number there’s one primary key all right all right now let me run a select statement to show the columns that we have in the movies table so I’ll write select star from movies give a semicolon and let me execute this okay so here on the at the bottom you can see we have the movie ID the movie name movie Jor and IMDb readings now the next command we are going to learn is how to delete a table so there is one way by using the SQL command that is drop table followed by the table name let’s say you want to delete students you can write drop table students and that will delete the table from the database this is one of the methods so you just select and run it now the other way is to you just right click on the table name and here you have delete slash drop if I select this you get a prompt are you sure you want to drop table students I’ll select yes so you can see we have successfully deleted our students table all right now let’s perform a few operations and learn a few more commands in post SQL so to do that I’m going to insert a few records to my movies table so for that I’ll use my insert command so I have my insert query written on a notepad I’ll just copy this and I’ll paste it on my query editor okay so let me just scroll down all right so here you can see I have used my insert command so I have written insert into the name of the table that is movies and we have the movie ID the movie name movie Jer and IMDb readings and these are the records or the rows so we have the first record as movie ID 101 the name of the movie is a very popular movie which is vertigo then we have the movie genre that is Mystery it is also a romance movie and then we have the IMDb readings the current IMDb readings that is 8.3 similarly we have sank Redemption we have 12 Angry Men there’s the Matrix seven inter staler and The Lion King so there are total eight records that we are going to insert into our movies table so let me just select this and hit execute okay you can see it has returned successfully eight records now if I run select star from movies you can see the records that are present in the table so I’ll write select star from movies I’ll select this and I’ll execute it there you go at the bottom you

    can see eight rows affected if I scroll this down you have the eight records of information in the movies table all right now if you want to describe the table you can go to the SQL cell and here if you write back SL D and the name of the table that is movies this will describe the table so here you have the column names this has the data type and here you can specify if there are any null values or any con constraints like default constraint or primary key or foreign key and others let me go back to my PG admin okay now first and foremost let me tell you how to update records in a table so suppose you have an existing table and by mistake you have uh entered some wrong values and you want to update those records later you can use the update query for that so I’m going to update my movies table and I’ll set the genre of movie ID 103 which is 12 Angry Men from drama to drama and crime so in our current Table we only have jonre as drama for 12 angry man I’m going to update this column which is the movie genre to drama and crime okay so let me show you how to do it I’ll write update followed by the name of the table that is movies go to the next line I’ll write set then I’ll give the column name which is moviecore Jer equal to I’m going to set it as drama comma crime earlier it was only drama and I’ll give my condition using the where Clause we’ll learn where clause in a bit so I’ll write where moviecore ID is equal to 103 so here our movie ID is the unique identifier so it will first look for movie ID 103 it will locate that movie and it change the genre to drama and crime so now you can see the difference earlier we had 12 Angry Men as drama as the movie genre now if I run this update statement okay you can see we have successfully updated one record now let me run the select statement again okay so here you can see if I scroll down there you go so movie ID 103 movie name 12 Angry Men we have successfully updated the genre as drama comma crime okay now let me tell you how you can delete records from a table so for that you can use the delete command so you’ll write delete from the table name that is movies where let’s say I want to delete the movie ID 108 which is The Lion King so I’ll write where moviecore ID is equal to 108 this is one of the ways to delete this particular movie or you can give let’s say where movie name is is equal to The Lion King let me select this and I’ll hit execute now if I run my select query again you see this time it has returned seven rows and you cannot find movie with movie ID 108 that was The Lion King so we have deleted it all right next we are going to learn about wear clause in post SQL so to learn we Clause I’ll be using the same movie table again let’s say we want to filter only those records for which the IMDB ratings of the movies is greater than 8.7 so this is my updated table now I want to display only those records or those movies whose IMDB ratings is greater than 8.7 so we’ll display 12 angry man which is 9 then we are going to display the Dark Knight which is again 9 and we are also going to display the sank Redemption which has 9.3 the rest of the movies have and am Tob rating less than 8.7 so we are not going to display those all right so let me show you how to write a we Clause so I’ll write select star from movies where I’ll give my column name that is IMDB ratings is greater than I’ll use the greater than symbol then I’ll pass my value that is 8.7 I’ll give a semicolon and let’s run it I’ll hit F5 there you go so we have returned the sank Redemption The Dark Knight and 12 Angry Men because only these movies had IMDB ratings greater than 8.7 okay now let’s see say you want to return only those movies which have IMDB ratings between 8.5 and 9 so for that I’m going to use another operator called between along with the wear Clause so let me show you how to use between with wear Clause I’ll write select star from movies where my IMDB uncore ratings is between I’ll write 8.5 I’ll give an and operator and 9.0 so all the movies that are between 8.5 and 9.0 ratings will be displayed so let’s select this and I’ll run it there you go so we have returned the darkno The Matrix the seven interal and we have the 12 Angry Men so a few of the course that we missed out where I think vertigo which has 8.3 and there’s one more all right now moving ahead let’s say you want to display the movies whose movie genre is action you can see in a table we have a few movies whose genre is action movie so you can do that as well I’ll write select star from movies where the movie J I’m writing this time in one line you can break it into two lines as well I’ll write moviecore Jer which is my column name equal to I’ll give within single codes action now why single code because action is a string hence we need to put it in single codes if I run this there you go so we had one movie in our table whose movie genre action that is The Dark Knight okay now you can also select particular columns from the table by specifying the column names now here in all the examples that we saw just now we are using star now star represents it will select all the columns in the table if you want to select specific columns in the table you can use the column names so you can specify the column names in the select statement let me show you let’s say you want to display the movie name and the movie genre from the table so you can write select moviecore name comma I’ll give the next column as moviecore Jer from my table name that is movies where let’s say the IMDB uncore ratings is less than 9.0 so this time in our result it will only show two columns that is movie name and movie JRE let me run it there you go so these are the movie names and the movie Jers you can see that have an IMDB ratings less than 9.0 all right like how you sh the between operator there is one more operator that you can use with the we Clause that is the in operator so the in operator works like a r clause or an R operator so let’s say I want to select all the columns from my movies table where the IMDB ratings is in 8 .7 or 9.0 if I run this it will display only those records whose IMDB ratings is 8.7 or 9.0 all right so up to now we have looked at how you can work on basic operations in SQL like your mathematical operations you saw how a select statement works we created a few tables then we inserted a few records to our tables we saw how you can delete a table from your database and we have performed a few operations like update delete and we saw how a wear Clause works now it’s time to load a employee CSV file or a CSV data set to post SQL so I’ll tell you how you can do that but first of all before loading or inserting the records we need to create an employee table so let me first go ahead and create a new table called employees in our SQL _ demo database so I’ll write create table my name of the table would be employees next I’m going to give my column names so my first column would be employee ID so the employee ID will be of type integer it is not going to contain any null values so I’ll write not null and I’ll give my constraint as primary key so the employee ID as you know is unique for all the employees in a company so once I write primary key it will ensure that there are no repetition in the employee IDs okay next I’ll have my employee name so my employee name is going to be of type varar and I’ll give my size as 40 okay next we’ll have the email address of the employee again email address would be of type varar and the size is 40 again I’ll give another comma this time we’ll have the gender of the employee gender is again worker of size let’s say 10 okay now let’s include a few more columns we’ll have the Department column so I’ll write department worker let’s say the size is 40 then let’s say we’ll have another column that is called address so the address column will have the country names of the employees address is also our car and finally we have the the salary of the employee salary I’m going to keep it as type real so real will ensure it will have decimal or floating Point values okay so now let me select this create table statement and execute it all right so we have successfully created our table if you want you can check by using select star from employees let me select this and I’ll hit execute all right you can see we have our employee ID as primary key there’s employee name email gender this department address and salary but we don’t have any records for each of these columns now it’s time for us to insert a few records to our employees table now to do that I’m going to use a CSV file so let me show you how the CSV file looks like okay so now I am on my Microsoft Excel sheet and on the top you can see this is my employe data. CSV file here we have the employee ID the employee name email gender this department address and salary now this data was generated using a simulator so this is not validated and you can see it has a few missing values so under email column you have a few employees who don’t have an email ID then you can see on Department also there are some missing values here as well all right so we’ll be importing this this table or the records present in this CSV file onto postr SQL all right so here in the left panel under tables let me right click and first refresh this there you go so initially we had only movies table and now we also have the employees table now what we need to do is I’ll right click again and here you see we have the option to import or export let me click on this and I don’t want to export I need to import so I’ll switch on import all right now it is asking me to give the file location so let me show you how to get the file location so this is my file location actually so my Excel file which was this is present in my e Drive under the data analytics folder I have another folder called postc SQL and within the post SQL folder I have my CSV file that is employe data. CSV so I’ll just select this you can either do it like this or you can browse and do okay now my format is CSP next I’m going to select my headers as yes and then let me go to columns and check if everything is fine all right so I have all my columns here let’s click on okay you can see I have a message here which says import undor export all right so here you can see successfully completed we can verify this by using select star from employees again if I run this all right let me close this there you go it says 150 rows affected which means we have inserted 150 rows of information to our employees table you can see we have the employee ID this are all unique we have the employee name the email we have the address and the salary let me scroll down so that okay you can see we have 150 rows of information that means we have 150 employes in our table okay now we are going to use this employees table and explore some Advanced SQL commands now there is an operator called distinct so see if I write select address from employees this is going to give me 150 address of all the employees there’s some problem here I did a spelling mistake there should be another D if I run this again I’ll query will return 150 rows you can see we have the different country names under address that is Russia we have France there United States we have Germany okay and I think we have Israel as well yeah now suppose you want to display only the unique address or the country names you can use the distinct keyword before the column name so if I write select distinct address from employee it will only display the unique country names present in the address column if I run this see it has return returned us six rows of information so we have Israel Russia Australia United States France and Germany all right now as I said there are a few null values which don’t have any information so you can use the isal operator in SQL to display all the null values that are there suppose I want to display all the employee names where the email ID has a null value so I’ll write select star from employees where email is null this is another way to use your wear Clause if I select and run this there you go so you see here for all these employee names there was no email ID present in the table so it has written us 16 rows of information so around 10% of employees do not have an email ID and if you see a few of them do not have an email ID and also they don’t have a department so if you want to know for those employees which do not have a department you can just replace where department is null instead of where email is null now if I select this okay it has returned us nine rows of information which means around 5% of employees do not have a Department moving ahead now let me show you how the order by Clause Works in SQL now the order buy is used to order your result in a particular format let’s say in ascending or descending order so the way to use is let’s say I want to select all the employ from my table so I’ll write select star from employees order by I want to order the employees based on their salary so I’ll write order by salary let me select and run it okay there is some problem I made a spelling mistake this should be employees let me run it again okay now if you mark the output a result has been ordered in ascending order so all the employees which have salary greater than $445,000 appear at the top and the employees with the highest salaries appear at the bottom so this has been ordered in ascending order which means your SQL or post SQL orders it in ascending order by default now let’s say you want to display the salaries in descending order so that all the top ranking employees in terms of salary appear at the top so you can use the dec keyword which means descending if I run this you can see the difference now so all the employees with the highest salary appear at the top while those with the lowest salaries appear at the bottom so this is how you can use an order by Clause okay so now I want to make a change in my existing table so here if you see under the address column we only have the country names so it would be better if we change the name of the address column to Country so I want to rename a column you can do this using the alter command in postc SQL so let me show you how to rename this column that is address so I’ll write alter table followed by the table name which is employees then I’m going to use rename column address I’ll write two I want to change it to Country if I give a semicolon and hit execute it will change my column name to Country now you can verify this if I run the select statement again there you go earlier it was address column and now we have successfully changed it to Country column okay let me come down now it’s time for us to explore a few more commands so this time I’m going to tell you how an and and an or operator Works in SQL so you can use the and and or operator along with the wear Clause so let’s say I want to s SE the employees who are from France and their salary is less than $80,000 so let me show you how to do it I’ll write select star from employees where I’m going to give two conditions so I’ll use the and clause or the and operator here I’ll write where country is equal to France now Mark here I’m not using address because because we just updated our table and changed the column name from address to Country so I’ll write country equal to France and my next condition would be my salary needs to be less than $80,000 I’ll go a semicolon let me run this all right so it has returned 19 rows of information you can see all my country names of France and the salary is less than $80,000 so this is how you can use or give multiple conditions in a we Clause using the and operator now let’s say you want to use the or operator and let’s say you want to know the employees who are from country Germany or the department should be sales so I’ll write select star from employees where country is equal to Germany and instead of and I’m going to use or their Department should be sales okay now let’s see the output I’ll hit F5 this time to run it all right so we have 23 rows of information now let me scroll to the right you can see either the country is Germany or the department is sales you see one of them in the table so here for the first record the country was Germany the second record the department was sales again sales again for the fourth record the country is Germany so this is how the or condition works so if one of the conditions are true it will return the result it need not be that both the conditions should satisfy now in post SQL there is another feature that is called limit so post SQL limit is an optional clause on the select statement now this is used as a constraint which will restrict the number of rows written by the query suppose you want to display the top five rows in a table you can use the limit operator suppose you want to skip the first five rows of information and then you want to display the next five you can do that using limit and offset so let’s explore how limit and offset works I’ll write select star from employees let’s say I’ll use my order by Clause I’ll write order by salary let’s say in descending and limit it to five this is going to display the top five employees which have the highest salary if I run this there you go you see it has given us five rows of information and these are the top five employes that have the highest salary okay so this is one method of or one way of using the limit Clause now in case you want to skip a number of rows before returning the result you can use offset Clause placed before the limit Clause so I’ll write select star from employees let’s say order by salary descending this time I’m going to use limit 5 and offset three so what this query will do is it will skip the first three rows and then it will print the next five rows if I run this there you go so this is how the result looks like okay now there is another clause which is called Fetch let me show you how that works I’ll copy my previous SQL query I’ll paste it here and here after descending I’m going to write fetch first three row only so my fetch is going to give me the first three rows from the top there you go it has given us the first three rows and you can see the top three employees that have the highest salary since we ordered it in descending order of salary all right you can also use the offset along with the fetch Clause I’ll copy this again and let me paste it here now after descending I’m going to write offset let’s say three rows and fetch first five rows only so what this SQL query is going to do is it will skip the first three rows of information and then it is going to display the next five rows it is going to work exactly the same as we saw for this query let me run it there you go so these are the first five rows of information after excluding the top three rows all right we have another operator that is called as like in post SQL so like is used to do pattern matching so suppose you have a table that has the employee names you forgot the full name of an employee but you remember the few initials so you can use the like operator to get an idea as to which employee name it is now let’s explore some examples to learn how the like operator Works in postris SQL so suppose you want to know the employees whose name starts with a so for that you can use the like operator let me show you how to do it so I want to display the employee name and let’s say I want to know their email IDs from the table name that is employee where since I want to know the employees whose name starts with a so I’ll write employee name like now to use the pattern is within single course I’ll write a and Then followed by percentage now this means the employee name should have an e in the beginning and percentage suggest it can have any other letter following a but in the beginning or the starting should be a if I run this so there is an error here the name of the table is employees and not employee let’s run this again there you go you can see there are 16 employees in our table whose name starts with a you can see this column employee name all of them have a letter A in the beginning okay now let me just copy this command or the query I’ll paste it here let’s say this time you want to know the employees whose name starts with s so instead of a I’ll write s so this means the starting letter should be S and followed by it can have any other letter if I run this so there are 10 employees in the table whose name starts with s okay let’s copy the query again and this time I want to know the employees whose name ends with d now the way to do it is instead of a percentage I’ll write this time percentage D which means at the beginning it can have any letter but the last letter in the string or in the name should be ending with D now let me copy and run this so there are 13 employees in the table whose name ends with a d you can see it here all right now let’s say you want to find the employees whose name contains ish or have ish in their names so the way to do is something like this so I’ll copy this now here instead of a percentage I’ll replace this with percentage ish percentage now this means that in the beginning it can have any letter and towards the end also it can have any letter but this ish should appear within the name let me run and show it to you okay so there is one employee who name contains ish you can see here there’s an ish in the last name of the employee all right now suppose you want to find the employee name which has U as the second letter it can have any letter in the beginning but the second letter of the employee name should have U now the way to do is I’ll copy this and instead of a% I’ll write underscore U followed by percent now this underscore you can think of a blank that can take any one letter so the beginning can start with a B C D or any of the 26 alphabets we have then then it should contain u as the second letter followed by any other letter or letters let me run this okay so there are 10 employees in the table whose name has a u as the second letter you can see these okay now moving ahead let me show you how you can use basic SQL functions or inbuild functions so we’ll explore a few mathematical functions now so let’s say you want to find the total sum of salary for all the employees so for that you can use the sum function that is available in SQL so I’ll write sum and inside the sum function I’ll give my column name that is salary from my table name that is employ let’s see the result this will return one unique value there you go now this is the total salary since the value is very large it has given in terms of e now one thing to note here is if you see the output the column says sum real so this output column is not really readable so SQL has a method which can fix is that is called an alas so since we are doing an operation of summing the salary column we can give an alas to this operation by using the as keyword so if I write sum of salary as let’s say total salary then this becomes my output column you can see the difference if I run this okay you can see now in the output we have the total salary now this is much more readable than the previous one so this is a feature in Excel where you can use or give alas names to your columns or your results now similarly let’s say you want to find the average of salary for all the employees now SQL has a function called AVG which calculates the mean or the average salary if I write AVG and I I can edit my alas name as well let’s see I’ll write mean salary let’s run it you can see the average salary for all the employees it’s around $81,000 okay now there are two more important functions that SQL provides us which is Max and minimum so if I write select maximum or Max which is the function name of salary as let’s say instead of total I’ll write maximum so this will return me the maximum salary of the employee let’s run it and see what is the maximum salary that is present in the salary column all right so we have 1ak 9,616 as highest salary of one of the employees similarly you can use the minan function as well I’ll just write minimum and this will return me the minimum salary of one of the employees in the table I’ll replace the alas name as minimum okay now run it this will give me the minimum salary that is present in our table so it is $4,680 okay now let’s say you you want to find the count of Department in the employees table you can use the count function so if I write select count let’s say I want to know the distinct Department names I can write inside the count function distinct Department as total departments from employees let’s run this this will return me the total number of departments that are there so it gives me there are 12 departments okay now let me show you one more thing here if I write select Department from employees let let’s run this okay so it has returned me 150 rows of information but what I’m going to do is I’ll place my distinct keyword here just before the column name so that I can verify how many departments are there in total there you go so there are 13 departments and one of them is null so moving ahead we’ll replace this null with a department Name by updating a table okay so now let’s update our department column so what we are going to do is wherever the department has a null value we are going to assign a new Department called analytics so earlier we have also learned how to use the update command so I’m going to show it again so we’ll write update followed by the table name that is employees I’m going to set my column that is Department equal to within single codes my name of the department would be analytics where department is I’ll say null so wherever the department has a null value we replace those information with Department that is analytics let’s run this you can see quy returned successfully now let’s say I’ll run this command again and this time you can see the difference there you go so we have 13 rows of information and there is no null department now we have added a new department that is analytics okay now we are going to explore two more crucial commands or Clauses in SQL that is Group by and having so let’s learn how Group by Clause Works in post SQL so the group by statement groups rows that have the same values into summary rows for example you can find the average salary of employees in each country or city or department so the group by Clause is used in collaboration with the select statement to arrange identical data into groups so suppose you want to find the average salary of the employees based on countries you can use the group by Clause so let me show you how to do it I’ll write select I want the countries and the average salary for each country so I’ll use the average function that is AVG and inside the function I’ll pass my column that is salary I’ll give an alas name as let’s say average uncore salary from my table name that is employees next I’m going to use my group by Clause so I’ll write Group by since I want to find the average salary for each country so I’ll write Group by country name let’s give a semicolon and let me run it I’ll use F5 there you go so here on the left you can see the country names we have Israel Russia Australia United States France and Germany and on the right the second column you can see the average salary for each of these countries now you can also order the result in whichever way you want suppose you want to arrange the results based on the average salary so you can use the order by Clause after the group by Clause so I’ll write order by here you can use the alas name that is average salary this is actually average uncore salary and let’s say I want to arrange it in descending order so I’ll write DSC now let’s run this you can mark the difference in the average salary column there you go so as per our result in United States the average salary is the highest and if I scroll down the average salary is the lowest in Germany now let’s see one more example using group buy suppose this time you want to find the maximum salary of male and female employees you can do that too so let me show you how to do it so I’ll write select this time we want to find the maximum salary based on gender so I’ll select my gender column comma and this time I’ll use my Max function since I want to find the maximum salary for male and female employees I’ll give an alas name as Max maximum underscore salary from my table that is employees Group by I’ll write gender okay so let’s run this there you go you can see so one of the female employees had a highest salary of $1 lak1 19,618 while of that of a me was $ 17,6 54 all right now suppose you want to find the count of employees based on each country you can use the count function along with the group by Clause so I’ll write the select statement select since I want to count the employees based on each country so I’ll first select my country column and then I’m going to use the count function I’ll write count e _ ID from my table name that is employees I’m going to group it by country so this query will give me the total number of employees from each country you can see here Israel there are four employees in Australia there are four employees in Russia we have 80 employees in France there were 31 in United States we have 2 7 so on and so forth now let me scroll down okay now it’s time to explore one more Clause a very important Clause that is used in post SQL that is having so the having Clause works like the wear Clause the difference is that wear Clause cannot be used with aggregate functions the having Clause is used with the group by Clause to return those rows that meet a condition so suppose you want to find the countries in which the average salary is greater than $80,000 so you can use the group by clause and the having Clause to get the result so I’ll write my select statement as select country comma I want the average salary so I’ll write AVG of salary I can give an alas name as average salary from employees now I’m going to group it by each country so Group by country colum since I want to find the countries in which the average salary is greater than 80,000 so I’ll use having Clause after the group by Clause I’ll write having average of salary is greater than 880,000 now this condition cannot be specified in the wear Clause so we need a having Clause you cannot use aggregate functions along with wear Clause let me just run it now there you go so we have Russia and United States where the average salary is greater than $80,000 all right now let’s say you want to find the count of employees in each country where there are less than 30 employees so for this I’m going to use the account function first let me select the country column then I’m going to use the count function and in the count function I’m going to pass my employee ID so that we can count the number of employees from my table that is employees now if you want you can use an alias name for this as well but I’m just skipping it for the time being I’ll write Group by country next I’ll write having count of employee ID less than 30 so this will return me the countries in which there are less than 30 employees let’s run it you can see here Israel Australia United States and Germany are the countries in which there are less than 30 employees okay now if you want you can use the order by Clause as well so suppose I’ll write here order by count of employee ID so what this will do is it will arrange my result in ascending order of employe ID count there you can see we have successfully arranged our result in s order of employee IDs okay next we are going to explore one more feature of post SQL that is of using a case statement now in post SQL the case expression is same as IFL statement in any other programming language it allows you to add if else logic to the query to form a powerful query now let me just scroll down and I’ll show you how to use a case statement this is very similar to your eel statement that you use on Excel in C++ in Python and or any other programming language so what I’m going to do is I’m going to write a SQL query that will create a new column and the name of the column would be let’s say salary range so I’m going to divide my salary suppose if the salary is greater than $45,000 and if it’s less than $555,000 in the new column that is salary range we are going to assign a value low salary now if the salary is greater than $55,000 and if it is less than $80,000 we are going to assign a value that is medium salary if the salary is greater than $80,000 we’ll assign a value High salary so all this we are going to do using our case expression in post SQL so I’ll start with my select statement but before that let me show you how to write a comment in post SQL so you can write a comment by giving a Double Dash comments are very helpful because they make your codes or the scripts readable I’ll write case expression in postc SQL similarly if you want you can go to the top and let’s say here you can write with Double Dash having clause okay let’s come down so I’ll write my select statement as select I want the department the country and the salary column I’ll give a comma and I’ll start with my case statement I’ll write case when my salary is greater than 45,000 and my salary is less than 55,000 then the result would be within single codes I’ll write low salary so this is exactly like an if else condition next I’ll write another case when salary is greater than 55,000 and salary is less than let’s say 80,000 then the result would be medium salary and finally I’ll give my last condition that is when salary is greater than 80,000 then the result will be high salary let me write this in a single line then High salary now one thing to remember in postris SQL the codes are insensitive so you can write your select statement in capital in lower case or in sentence case similarly I can write case as small C or you can write as Capital C all right now moving ahead after this I’m going to write end I’ll give an alas name as salary range now this is going to be my new column in the output let me just come down after this we need to give our table name from employees I’ll order it by salary descending okay so what I’m going to do here is I’ll first select Department country and salary column from my employes table and then I’m creating a new column that is salary range and I’m specifying the range so I have three conditions here for low salary for medium salary and high salary so so let’s run this and see the output there you go here you can see we have added a new column known as salary range and we have order our salary in descending order so all the highest salaries appear at the Top If I just scroll down you can see we have medium salaries here and if I scroll down further you can see this low salaries so case statements are really useful when you want to create a new column based on some conditions in the existing table all right now moving ahead we are now going to see how to write subqueries in post SQL so subqueries we write a query inside another query which is also known as nested query so suppose we want to find the employee name Department country and salary of those employees whose salary is greater than the average salary so in such cases you can use subqueries but let me show you how to write a query inside another query first I’ll write the select statement I’m going to select the employee name comma I want the department comma also want to display the country name and the salary from the employees table where my salary should be greater than the average salary so after this bear salary greater than I’m going to use brackets and write my subquery that is Select average salary from employees now let me break it down for you so first we are going to select the average salary from the employees so this particular SQL statement we’ll find the average salary from the table we’ll compare this average salary with salaries of all the employees so whichever employee has the salary greater than the average salary will display their names the department country and their original salary so if you want you can run this statement as well let me select this statement and run it for you you can see we have return the average salary of all the employees which is nearly $81,400 $6 so we want the salaries of the employees to be greater than this average value so let me run this and see how many employees have a salary greater than the average salary there you go so we have around 75 employees whose average salary or whose salary is greater than the average salary all right now moving ahead this time I’m going to tell you how to use some inbuilt functions we learn some inbuilt mathematical functions and string functions that are available in postris SQL so I’ll just give a comment there’s another way to write a comment instead of a Double Dash you can use the forward slash an asteris and inside the asteris you can write let’s say SQL functions and you need to close this so I’ll give another asteris and a forward slash so this is also a comment in postris SQL all right so first of all we’ll explore a few math functions so there is a function called ABS which is used to find the absolute of a value so if I write select abs of let’s say Min – 100 it is going to return me positive 100 or just 100 because as you know the absolute of any value will remove the negative sign involved in that value there you go so our original input was – 100 the absolute of- 100 is + 100 next let’s see another function that is called greatest so the greatest function in post SQL will return the greatest number in a range of numbers so suppose I write select greatest inside the greatest function I’ll pass in a few few numbers let’s say two I’m just randomly passing a few numbers let’s say 4 90 let’s say 56.5 and let’s say 70 I’ll give a semicolon let me run this you will see the greatest function will return the greatest integer value or greatest number that is present in the range of numbers that we have provided so in this case 90 was the largest number or the greatest numbers so we got the result as 90 again you can use an alas for each of these statements now like greatest we also have a function called least which is going to return the least number present in a range of numbers if I run this so the result is two because two is the least number that is present in this selection all right now there’s a function called mod which is going to return the remainder of a division so suppose I write select mod and this takes two parameters let’s say 54 ided 10 as you can guess the remainder is 4 and so is our result you can see it has return the remainder 54 divided by 10 the remainder is 4 all right if I scroll down now let’s see how to use the power function so I’ll write select power let’s say I want to know power 2 comma 3 which is 2 Cube that is 8 let me just run this there you go so the result is 8 you can also check let’s say power of 5 comma 3 it should be 125 all right next you can use the sqrt function that is available in post SQL to find the square root of a number I’ll write sqrt and let’s say I want to find the square root of 100 you can guess the result the output should be 10 if I run this you can see the output here 10 let’s say I want to find the square root of let’s say 144 you can again guess the result it should be 12 let’s verify it okay there is some error let me verify it again there you go it is 12 now there are a few trigonometric functions as well you can use the S function the COS function and the tan function let’s say I want to know the sign of 0 if you have studied High School mathematics you would know the sign of 0 is 0 you can see the result it is0 let’s say you want to know s 90 if I run it you can see the output here 89 all right now there are other functions like ceiling and floor that you can use so let me show you what the ceiling and floor function does I’ll write ceiling let’s say I’ll pass my floating value as 6.45 and let me run it you can see the ceiling function Returns the next highest integer that is 7 in this case since the next highest integer after 6.45 is 7 let’s see what the floor function does and let me run it as you can see the floor function Returns the next lowest integer that is six in this case or the nearest lowest integer to any provided decimal value okay now that we saw how to use mathematical functions there are a few string functions available in postris SQL so let’s explore them as well I’ll write string functions okay scroll down cool there’s a function called character length that gives you the length of a text string suppose I write select give the function as character length and inside this function I’m going to pass in a text let’s say India is a democracy this is my text let me run this okay you can see the result here which is 20 since there are 20 characters in my string that I have provided all right now there’s another function called concat in post SQL so concat is basically used to merge or combine multiple strings so I’ll write select concat within brackets I’ll give the text string now let’s say I want to combine post Crest SQL I’ll give a speed comma I want to merge post SQL is I’ll give another comma and write my final word that is interesting now what we have done is inside the concat function we have passed in separate strings and now using the concard function we want to merge the three strings let’s see what what the result is I’ll run it all right let me just expand this you can see here we have Conca inated the three strings successfully so the output is post SQL is interesting okay now there are functions like left right and mid in post SQL so what the left function does is it will extract the number of characters that you specify from the left of a string let’s say I’ll write select left and I’ll pass in my text string as India a democracy I’ll copy this and I’ll paste it here let’s say I want to extract the first five characters from my string so I’ll give five so what it will do is it will count five characters from left so 1 2 3 4 and 5 if I run this it should ideally print in for me there you go it has printed India for us all right similarly you can use the right function to extract few characters from the right of a string let’s say you want to extract let’s say I’ll give 12 characters from right so from here onwards it will count 12 characters I’ll change left to right now let me select this and run it so you can see here this is the output from the right it has counted 12 characters and returned a democracy okay now there is a function called repeat so the repeat function is going to repeat a particular string the number of times you specify let’s say I want to select and use my repeat function and inside the repeat function I’m going to pass in let’s say India and I want India to be displayed five times I’ll give a semicolon and run it in the output you can see India has been printed five times okay let’s scroll down there is another function a string function in post SQL called as reverse so what reverse function is going to do is it is going to print any string passed as an input in reverse order so if I write select reverse and inside the reverse function I’ll pass in my string that is India is a democracy I’m going to use the same string I’ll copy this and I’ll paste it here I close the codes and the brackets let’s print this you can see it here India is a democracy has been printed in reverse order there you go all right now this time we explored a few inbuilt functions that are already present in post SQL now post SQL also has the feature where you can write your own user defined functions so now we will learn how to write a function of Our Own in postris SQL so let’s create a function to count the total number of email IDs that are present in our employees table so for this we’ll write a function a user defined function so let me give my comment as user defined function okay so let me start by first writing create so this is the syntax to write a function in post SQL so I’ll write create or replace function then I’ll give my function name as count emails and as you know functions have brackets then I’ll write Returns the return type as integer then an alas with dollar symbol I’ll write total emails since I’m going to display the total number of email IDs that are present in my table I’ll close the dollar symbol then I’m going to declare a variable the variable name is going to be total underscore emails this is of type integer I’ll write big and inside begin I’ll write my select statement so I’ll write select I want to count the email IDs that are present so I’ll pass my column name that is email into total emails from my table name that is employees I’ll give a semicolon and then we’ll write return total emails as you know user defined functions often return a value so hence we have mentioned the return statement as well and now I’m going to end my function then the next syntax would be let me just scroll down Okay so here I’ll give my dollar symbol again followed by total underscore emails next I’ll write my language post SQL so the way to mention is PL p g SQL let’s give a semicolon and end it so this is my user defined function function that I have written so I created a function with the function name countor emails and this would return integer as an alas which is total _ emails we declared that variable as an integer then we started with our begin statement that has my select statement where I’m selecting the count of email IDs that are present in the employees table and I’m am putting the value into total _ email so I’ve have used the into keyword and this Returns the result as total _ emails and I have ended let’s run this okay there is some problem there is an typo so this should be integer okay let me run it once again there you go so you’ve successfully created a userdefined function now the final step is to call that function now to call this function I’m going to use my select statement and the function name that is countor emails I’ll give a semicolon let’s execute this there you go so here you can see there are 134 email IDs present in our employees table now one thing to Mark is there are total 150 employees in the table but out of them 134 employees have email IDs the rest of them don’t have so they would ID have null values all right so that brings us to the end of this demo session on postris SQL tutorial let me go to the top we have explored a lot so we started with checking the version of post SQL then we saw how to perform basic mathematical operation that is to add subtract multiply then we saw how to create a table that was movies we inserted a few records to our movies table then we used our select Clause we updated a few values then we deleted one row of information then we learned how to use the wear Clause we learned how to use the between operator we also learned how to use the in Operator Let Me scroll down we created a table called employees and then we learned how the distinct keyword works we also learned how to use isnull with wear Clause we learned about the order by Clause we saw how to alter or rename a column then we explored a few more examples on WE Clause where we learned about and and or operator then we learned how to use limit and offset as well as the fetch operator or the fetch keyword in postr SQL moving further we learned about the like operator in SQL which was used to perform pattern recognition or pattern matching you can say here we saw how to use basic inbuilt post SQL functions like sum average minimum count maximum next we saw how to update a value in a column using post SQL update command we Lo learned how to use Group by then we learned how to use having Clause then we learned how to use case expressions in postc SQL so we saw how case expression is similar to our ifls in any other programming language we explored a few mathematical and string functions and finally we wrote Our Own userdefined function so that brings us to the end of this tutorial on postris SQL in this session we will learn about how to join three or more tables in SQL that’s right so so far we have a fundamental understanding of how to join two tables but in a few situations you might have to extract the data by joining three or more tables right so that’s exactly what we are going to discuss today now without further delay let’s get started now we will jump into the MySQL workbench where we have our query ready so here we will be using three tables employe details employ employe register and employee joining register so we want employee name contact number and joining date joining date is available in joining register contact number is available in employee register and employee name is available in in employee details right so here we are utilizing all three tables and joining them to extract these three columns so here I’m providing the table name and the column name to make sure that the SQL workbench will not get confused which employee name I mean which employee name column should I access which table should I use so to clear that confusion I’m providing the table name so my SQL will use employee details table and from there it will extract the employee name column and contact number to be sure it is present in only one table so it will go to employee register and joining date it is also present in only one table so no need to specify the table name name but to be on safer side if you want to add you can add that’s well and good and it will create an impact to your interviewer considering that you know about the syntaxes so I’ll just follow the normal syntax the way I’m going now and now I’m trying to join it’s the same operation what you use to join two different tables so you’ll just join use the join clause and give the second table name and on what basis so I’m joining these two tables on the primary key employee ID so both tables have the same common employee ID So based on that I’m joining these two tables and then you will use the join Clause once again and give the third table name here and based on which primary key or which common key so this is the one which is common in both the tables and is unique which is the employee ID so I’m using the same one to join the two tables with the third one you can follow the same syntax and join another table to it as well so with this let’s execute this particular query to find our answer so there you go you got the query executed and you have the table over here with employee name contact and joining date let’s quickly get back to my SQL workbench so here let’s say you wanted to create a table and load the data so if the data is minimalistic maybe the data about 10 rows or 15 rows you can manually create a table and insert the elements into your table using such insert commands but this set like mine which is in the Excel spreadsheet and and has about 10,000 rows would you like to you know write 10,000 insert commands no right it would be really timec consuming so for situations like this MySQL workbench has enabled developers to load the data from spreadsheets within a few steps but before we get started let’s check our column headers so here you can see uh it is not compatible with the MySQL workbench or SQL commands right so it has a space and it has a word row and it is a keyword in my SQL right so we don’t want that confusion so for that reason we will try to modify this maybe using an underscore right similarly for the row ID you can eliminate space and use an underscore and when it comes to order ID the same so just let us quickly change all the column headers so that there are SQL compartible there you go so we have replaced all the headers with underscores and made them SQL compatible so let us save it and when you’re saving it just make sure that your Excel file data is also having the uh you know SQL compatible uh name so here we have load CSV to my SQL so here we have the name with space right so let’s try to change that to lowercase Excel data and like right now it is is SQL compatible Now quickly let’s go back to my SQL workbench here we have it now you can just create a new table just right click here or you can also do it from here create a new database and the new schema will be the name of your data set so let’s type it as Excel data or just Excel and apply now this is the schema apply now you have Excel right here just drop down on here you can see the tables right click the tables and here you have the option of uh import data Vis it right just click on that now browse your folders and have it so yeah another notification for you guys so you need to save your Excel spreadsheet in the form of comma separated file right let’s quickly go back and do that open your spreadsheet go to file see as comma separated file save there you go now let’s get back to workbench and now I think you will be able to find it just open next drop table of access make sure you do that to be on the safest side and check all the names here so we have a problem with row ID but that is something which you can fix down the line and before you go to the next step check all the other names as well every other name on the column header is fine just the first one we can just alter the table not a big deal and uh next it should start importing there you go the data file got imported of course it took a little while because it’s 10,000 that’s normal now let’s quickly go to the next step and here you can see 9,987 records imported successfully just click on finish and I think it should be shortly done let’s close the schema go to the query table and and yeah so you can quickly refresh so that you will have the Excel dat over here now let’s use the database that is Excel on it now we are in Excel database now the table we’re looking for is Select star from the data name the data table name is Excel data without a space semicolon just quickly run it and I think we should be shortly able to see all the data sets right over here yeah about the First Column ID we can simply use the alter table um function or query to change the name let’s quickly do that with the table name alter table rename okay what was this can you copy that copy field name rename row ID to so um a small see syntax ER there so I think they should be sorted yeah and now let’s quickly run this and I guess it should be done now let’s quickly run the select command again there you go so we have the row ID order ID uh aut dates ship dates ship in mode customer ID customer name Etc and everything is as per the expectations and that’s how you can load Excel data to mySQL workbench we will learn about the top five interview questions in SQL that you must know to crack your business analytics interviews now without further Ado let’s get started so speaking about the tough five interview questions let’s quickly jump to the workbench of SQL so I’m using my SQL workbench and here we have a database called use simply learn so SLP is the database name so we will be using the use command to get access to that particular database so we are in access to it and now let’s quickly check out tables show tables there you go we have a few tables here book collection book order employee details joining register and employee register so let’s go with the employee details so I’ll just simply shoot a command select star from EMP details so now we have our employee table so we will be using this particular data set to run few queries from our interview questions so getting back to the interview questions so most commonly you will be asked the following interview questions so the first question is you will be asked to find out the names of the employees that start with the vbls so AEI w u so they will ask a question give me the list of names that start with these five letters it can be either a or e or I O U right so what’s the question so here you will be using like operators and not like operators let’s say they want the names with vels so you can just use the like operator and use this particular command select employee name that’s the name of the column from employee register or employee details and then where employee name is like a modulus which means it should start with a and it can have any number of alphabets after that right so let’s quickly also check what do we have in employee register so I think it’s a similar table to employ details that we used before we have the same details here so no not our problem now let’s try to extract the names of the employees W names start with WS right so we will be using the we clause and like operators run the command and there you go so we have three names so if if you able to answer this question they will ask they might ask a similar question with a little modification so this time they might ask you give me the list of names that will not start with vels so you’ll just replace the like operator with not like so either they’ll ask the questions which might ask start with vels or they might ask a question which does not start with vels this is one of the common questions now going to the second question so here also they will give it a Simple Start they will ask to give the details of the employe who has the highest salary or they will ask you to give the highest salary you can simply use the max aggregation and you can get the maximum salary so we have $887,000 and sometimes if you are able to answer this question they will make it a little tricky to you and they will ask give the second highest salary here you can use offset or there are multiple possibilities but let me give you the simplest one where you can have the same query only difference is where salary is less than Max of salary first the subquery will be executed which will extract the maximum salary and the next one is less than so it’ll give you only one R which has a little salary which is Les less than the maximum one right so simply let’s execute the query so we will have the answer so the next highest salary is $78,000 now moving on to the third question so sometimes they will ask you to use the update commands as well so here we have some salary details of our employees in the employee register employee going to do here is let’s say this is the appraisal period and they’re giving you 15% hike to all the employees so you need to update the salary column so what you do is simply uh update table name salary plus salary into the percentage of hike which is 15% so here we adding that particular percentage in the form of decimal numbers which is 0.15 and simply run the command and you have it now you can just simply uh query the same detail which is Select Staff from employee details so you will have the updated salary list here there you go now let’s proceed with the next question that we have in our list which is about select the employee name and salary from a given range right if they ask you give me only the range of employees who ow salary lies between 50,000 to 70,000 so you can use the between operator here and range of numbers that is 50,000 and 70,000 just run this particular code and there you go you have the Dil so there are two employees whose salary lies between 50,000 and 70,000 now the last question is uh they might ask you to extract the details from a certain department so basically this might also turn up to find a difference between having and group by Clause sorry having and wear Clause yeah so this is one of the common interview questions where they will ask the difference between having and wear Clause so when you are implementing Group by in your quer query and you’re also implementing some aggregate functions like count sum Etc minimum maximum in those situations when a group by Claus is involved then you can use having when there is no uh Group by function then you can simply go with the wear Clause so here I’m trying to extract the number of people present in finance department so I’m not grouping by department so I can just use where clause and run this and now in situations where I have to group by I mean you know when I have to implement Group by in those scenarios you can include having clause in place of well so that is the fundamental difference between having and group by and also you got the understanding of group by command here imagine walking into a giant Library this isn’t just any Library it’s huge there are rows and rows of shelf each packed with thousands of books but wait you don’t need to read every book here you’re just looking for specific ones like books about space or stories about superheroes but finding what you need is such a huge uge Library that’s going to be tricky this massive library is like a database a database is a huge collection of information stored neatly ready to be used it holds everything name address grades prices whatever data you can think of but sometimes all that information can be overwhelming you don’t want to shift through everything every time you need something specific right that’s where views comes in in this video we will explore views in Sequel explaining what what they are and how they simplify working with databases we’ll also cover how to create views manage them by updating deleting and listing them and also introduce different types of views like simple complex read only and those with check option we’ll also dive into materialized views which store data for faster queries and by the end you will understand how views can manage data easier and more efficient we will also look into a quiz question to clarify your understanding so what exactly is a view let’s go back to our Library example imagine if you had a Magic Window a special one that only shows you the books about space or superheroes that you are interested in you don’t have to wander through the entire Library anymore you just look through your magic window and it gives you exactly what you need that Magic Window is what a view is in the world of databases a view is a special virtual window into a data that shows you only what you need to see and the best part is it’s not actually stor any new data it’s giving you a filtered look into a huge database think of view as a shortcut making your life a whole lot easier so let us get into the demo part about how to creating a view and the types of views in SQL so let’s start with the demo part that is how do we create a table in my SQL so here as you can see uh I’ve just logged into an online compiler and now we will just learn how we create a table and then we’ll move on to creating views and the types of views so first to create a table just enter this command just WR over here create create table sorry and this just enter the table name it could be something like student details and here you can give the U student ID name we want a student ID name in the first row so we’ll just keep s ID and and the type of the variable is integers we’ll just mention in here and since it’s a primary key you just mention it over your primary key

    next variable can be something like name and for this the type is bar care you can just enter any number here suppose I’ve enter 255 I’m sorry comma next mention the address again it’s Vare address so as you can see we have created this table with student ID name so we have to give you underscore student ID name with primary key inte teer type and the name and the address over here so after we have created this table we want to insert data into the table this is our next step step so to insert data what could be the basic uh command which you can write can be something like insert into student the table name student details over here and just mention what all uh columns which we have attributes we have created which is uh S uncore ID next is name and then we have address over here and then we mention the values so now that we have created table and then we can enter our details over here so these are the values which I have inserted which is hsh Ashish prati tanra sham okay so like this you can enter the values over here and now if I want my records to be displayed here the command which I’m using is Select star from student details so all these the table will be shown here so we’ll just click on this run button over here okay so now you can see this is the Sid name number and the names which we have mentioned over here so as you can see this is the output generated this is the Sid the name and here is the address so as you can see the table is created now and the output is also shown now we will move on to the main step which is creating a view so what exactly is a view a view is like a window that lets you see specific data as I’ve already told you in the intro part so now let’s say we only care about students with S ID less than five okay and instead of running the same query every time we want to create a view so here’s how you can do it you can just simply enter the command so here’s how you can create a view so just mention this U command which is create view detail view as select name comma address from student details so student details is the table here which we have already created before and I want the student ID less than five okay so I want this to be shown here so we’ll just simply click on run over here so as you can see this is the error it’s showing why is it showing because line number 203 view must be the first statement in a query batch so to resolve this we have to ensure that the SQL batch is properly separated by go command and the view creation is syntactically correct all right so we haven’t used the go command here to do that we just simply after we have inserted our records in the table here you just type goo okay and so this is the end of the first batch and now since we have have created a view in a new batch we’ll just mention this uh whatever command we have already given and at the end of the second batch we’ll again write Cod okay and now next I want my query to be shown here so I’ll just write this command for my for generating my output which is Select select star from and the table name okay not that uh student details table name name I want this the view table name to be show which is detail view right this is the table name so just copy it from here just paste it give this semicolon so now you can see a view is created so why have we used go because go ensures that to create view command is executed in a new batch and this will help the SQL Server properly separate commands and avoid conflict all right right and we have also used the select star from details view which will fetch the data from The View and includes only student with student ID less than five which is danj pratik Ashish and hsh okay name and the address is displayed over here so this is our output generated now let’s talk about managing views and updating the view let’s say later on you want to update the view to also include the students age instead of deleting or recreating the view you can use create or replace view to update it so let’s add the age column to the table now so we have to just insert the data for the students here so to add a new column age to the students detail table we need to use this command which is Alter table and then provide the name of the table which is student details add age and the type is integer and give the semicolon over here all right and now we have to insert the age data for the student so to do this we will use the update command and here we will just write this update okay name of the table which is student and here we use set age is equal to 19 where S ID is equal to two no sorry with the S ID is equal to one so in the similar way you have to just update all the table over here so after updating it you can just simply search run here so like this you will just update the student details and set the age accordingly and now the next step is after updating it we have as you can see we have just entered all the age number which we want to be displayed here and we have used the insert to command to insert records into the table with the age values and now in order to select it we will uh give the command which is Select star from and the name of the table which is student details and now we want to end the P we have to use this go command enter so now as you can see we have updated and inserted all the age data for the students and we have selected all the data from student details to display the final result by giving this command which is Select Staff from student details and this is the name shown over here and here is the address and this is the age so we have inserted all the age data and we have also corrected the update statement set age is equal to 19 where Sid is equal to 1 and do not forget to add this go okay now the next thing which we will be talking about is deleting a view in order to delete a view you just simply have to uh give this command which is drop view if exists and then give the name I mean the table name which is details view right and just simply you can uh go to this just run and you can see that our table has been dropped okay so now we have deleted our table just by giving this command now so and do not forget that this command will delete the view but don’t worry the data in the original student details table will not be affected only the view table which we have created is deleted and now next we’ll be talking about listing all the views okay so now in order to list all the views just you have to Simply write this command which is show full tables where table type is equals to v i view so by doing this thing uh this output will give you all the views which we have created in this table the name student ID okay and the uh addresses and also the age so it will give you all the table view table which we have created now let’s move on to the main part which is uh the types of views in SQL now let us first understand what is a simple view so simple View view is Created from a single table it’s straightforward and it doesn’t involve complex Logics like joints or subqueries for example to create a simple table you just simply have to write this command which is create view student names as and then select name from student details okay so if you query this View and then write select star from student names okay so after doing this thing you just simply click on run so after we have written this view simple view which is create view student name as select name from student details and do not forget again to mention this go and then select query the simple view to display student names and Select Staff and student names all right and at last again add this go and here this is the output generated the names all right so by using simple query you can do this thing now let’s move on to the second card which is creating a complex view a complex view involves multiple tables or complex logic let’s say we have another table who has student marks that that stores student marks so let’s say so let’s say we have created this table student marks and uh we have given the details here and again we have inserted the data values student ID marks 1 93 these are the values which we have inserted this is the student ID and these are the marks which we have given all right so now let’s create a view that pulls data from both student details and student marks so now as you can see we have created a complex view by providing all these details and this is the student ID and the marks shown over here all right so now let’s move on to the third part which is readon view so a readon view ensures that no one can modify the data through the view this is useful when you want users to able to see the data but not change it to make the view read only you can use permissions in your SQL databases and this feature depends on on your database engine to create a readon view and SQL Server we cannot directly enforce read only Behavior with the create view statement however you can control access to the View using permissions so here’s you can how you can do it uh so first you can create the view normally you can use revoke insert update and also delete permissions from users for that particular view uring that they can only read the data so now uh this was all for the readon view let’s move on to the fourth type of the view which we are discussing today which is the check option so with the check option is seel which is with the check option I’ll just type here with check option okay this is the fourth type of view which we are talking about with check option and cq4 it ensures that any insert or update operation performed through a view complies with the conditions specified in the where laws of the view this means that you cannot insert or update records through the view that violate the condition of the view itself so let’s go through the creation of a view with the WID check option and provide an example with an explanation and expected output so now as you can see we have the expected output for the valid insertion uh using this command which is with check option and with view creation check option we created a view named a sample view as you can see here that selects student ID and name from the student details table but only where the name is not null all right so as you can see we have clearly mentioned here not null and the width check option ensures that any insert or update through the view must comply with a condition where name is not n and the first insert into sample view inserts so student where stent id6 name which also has a valid name and here is the output generated here all right this is the student ID the name over here and that’s it so now we have learned about this width check option as well now I’ll be talking about a materialized view so what exactly is a materialized view well a materialized view is different from a regular view because it stores the actual data in a database meaning the data is precomputed and doesn’t need to be fetched from tables every time you query it this makes accessing data from a materialized view much faster especially for complex query all right so as you can see we have created the table and we create three tables the order details table and the product details and also the customer details table over here and then we have provide the necessary data also the Second Step was the sample data is inserted into all the three tables the materialized view fast order summary is created to summarize orders joining data from the three tables and Computing the total cost and the next step is the materialized view is queried and because the data is precomputed it returns results very quickly with new data when added to the audit DS table the materialized view is refreshed using refreshed materialized view to include the new data all right I hope you get it why are we using the refreshed option and the next step is the materialized view is deleted using the job materialized table over here we have used this job materialized view fast order summary and in this way you can you know uh create a materialized view so now you might be wondering that what is the difference between the materialized view and the complex View and the simple view I’ll be seeing you that later so first let us now discuss why are views so useful okay so uh why are views so useful by now you might be wondering what’s the big deal with the views and here’s why it’s so useful they make our life easy you don’t have to keep writing complex queries over and over you create a view once and it saves you tons of time we also help you in simplifying data instead of pulling everything from your database use can help you narrow down exactly what you need you also help in improving security want to show only certain parts of the data to certain people use views to control what others can see without letting them touch the raw data you can also rename columns for clarity you can rename confusing columns in the view without changing the original table making it easier for users to understand the data so so let us not discuss the differences between the simple complex and the materialized view so here’s a quick summary of the differences so simple view PS data from a single table no complex logic or joints involved and it doesn’t store data it also the performance is it executes every query every time whereas the complex view it combines data from multiple tables using joints Aggregates or other complex logic and it doesn’t store data executes query every time and talking about a materialized view it stores the result of a query making it faster to retrieve data without running the query again it also stores data and it is much faster as it uses pre computed data so now it’s time for the quiz here’s a quiz question for you what is the key difference between a regular View and a materialized view in SQL the first option is regular view store data but materialized views don’t second option is materialized view stores data but regular views don’t C both regular and materialized view stores data and number D is neither of them store data so if you want to answer them you can just write them in the comment section below and that’s it views are an incredible tool in SQL that can simplify your queries improve security and make your life easier so SQL Server is a powerful relational database management system developed by the Microsoft which is widely used for managing and storing the data its benefits include High scalability robust security features and seamless integration with other Microsoft tools tools and Technologies SQL Server provides efficient data management through advanced features like indexing full text search and inmemory processing it also offers excellent support for large D sets making it ideal for Enterprise applications the built-in business intelligence tools help organization gain valuable insights from their data SQL service High availability and Disaster Recovery features ensure continuous operations with minimal downtime with strong data integrity and transactional support it ensures reliable and consistent data management across all applications that said if these are the type of videos you’d like to watch then hit that like And subscribe buttons and the bell icon to get notified so in this session for today which is SQL over tutorial we will cover the SQL Basics that is how to create a table how to insert data how to retrieve the data from the tables Etc and apart from that we will also go through some of the other fundamentals of SQL basics which include sorting in SQL server and followed by that we will also go through the group bu and OD by sequences in SQL Server next ahead we will also learn another important part which is conditional statements which includes case statements in SQL proceeding ahead we will get into another segment of today’s session which is about joints and SQL where we will be combining two or more tables in SQL Server followed by that we have the next part of today’s session which is all about the having clause in SQL Server next we will proceed with learning the next part which is about the between operator in SQL server and followed by that we will get ahead with pattern matching in SQL Server next we will cover the time and date functions available in SQL server and after that we will proceed with temp which is temporary tables and SQL server and proceeding ahead we have the most important part which is about the Common Table expressions in SQL server and followed by that we have the last part in SQL Server tutorial which is about creating views and executing a query to extract the data present in a view in SQL so far so good so these are the foundational skills in SQL Server that you need to get before becoming a pro in SQL Server so this particular tutorial will discuss the major Foundation skills the fundamental skills the basics of SE server and its operations now without further delay let’s get started with one of the compilers which can help us execute the SQL Server queries so we are on one of the SQL Server compilers available online in case if you are facing any difficulty setting up the SQL Server management studio in your PC then you can come up with this one and we’ve also set a particular tutorial where you can learn how to download and install SQL Server management studio and how to configure your SQL Server management studio and the link to that particular tutorial will be dropped in the description box below make sure to refer that in case if you wanted to execute these same codes in SQL Server management studio right so first we will be dealing with two different data table so we will be dealing with customer data and dealership data so the first table will be about the customer data where we will be having about the order ID audit date delivery date dealership in code product category and car fuel type Etc followed by that we will insert some rows into that particular customer table about 15 to 20 tables and after that we have dealership database where we will be having AIT date state region customer ID customer name primary foreign Etc and we will be inserting about 20 entries into that particular table don’t worry if you have more than 20 entries in case if you have more than 20 entries let’s say about 2,000 entries or 20,000 entries it’s not at all a big deal if you’re working on SQL Server studio right there you can use the wizard to just ingest the data from your Source into the SQL Server right you can use ssis tool to import all that data and you’re good to go you don’t have to manually create the data and you don’t have to manually insert the data just for the sake of learning the basic process of how to create a data table and how to insert the data table you’re going through this particular procedure so far so good so we have also inserted the data in the next data table which is our dealership data and now let’s query the data from our tables and now let’s select the execute data there you go we have the data table right over here and let’s copy this query and paste it to query the data from the customer table as well so instead of dealership we will be writing down customer so if You observe closely I’m using uppercase for us like select and from and sentence case or lower case for the variables the table names Etc so that there’s a difference between the keyword as well as the regular variables there you go we have executed the customer data and here we have it the order ID order date delivery date dat to deliver category and Etc now let’s mention the use cases corre so um let’s use double codes or maybe we can also use hasht along with the pipe symbol here or the slash symbol here and write the use cases and then proceed with executing the codes or queries so the first use case is let’s try to filter customers from specific regions and now let’s close this particular command proceed with writing the query so we will be using select keyword and we want customers from a specific region right so let’s write down the customer name so I think the customer name is not mentioned in the customer data but instead of customer name we have a order ID so let’s extract the order ID not a problem select order ID and dealership name for state and the important part which is about the region and what product did they and what’s the revenue that uh the dealership has extracted out of that particular customer from the table customer next line is about join dealership so we will be using join table dealership the keyword so we have one common keyword in between both the tables which is about the order ID which is equals to order ID so this is not done here since we are clubbing both tables we need to specify the tables here so dealership do order ID and customer. Order ID so that the SQL Server will identify via are trying to map two different tables and uh we are trying to combine and extract the data now we are trying to filter out uh customers from a specific region correct now we will be using we Clause to specify that particular region so let’s go with west region correct since we are using the text format here so it’s better we choose double codes correct now let’s run this query let’s give it a next try ambiguous order ID so um let’s do one thing we will pull customer table name here so that it’s no more ambiguous there you go so the thing is we have order ID in both the tables customer table and dealership table so SQL Server got confused here which particular table you want me to extract order ID from so if you mention customer table or dealership table it will choose a specific table and extract that particular column now we have the order ID dealership and all the members that we selected are from the vest region if you check here now let’s proceed with the Second Use case of today’s session or okay let’s continue with the same here so that it is clearly visible for us now let’s sort you’re using the sort command here products B B on the revenue so it’s like maybe uh highest revenue should be in the top or lowest Revenue should be in the top let’s go with the highest revenue okay sort products based on uh or based by Revenue we will write the command here itself we will go with uh some columns I would like to have product here so I’ll eliminate everything else and the product will be here and I want the revenue as well now I don’t want the revenue I want the total revenue so if you’re looking for total then you will be going with the function or aggregate function which is sum right I want the sum of all the revenues that particular product has earned throughout the years or that particular Financial Year from which table so I have both product and revenue in the customer table itself so I’ll go with customer table itself I don’t want to join anything here I’ll eliminate the join command and uh instead of region or instead of we command I would use the group by command here bu product and it is not done so far we want to order it so we want to keep it in descending order so that the highest grossing product is on the top and the lowest Crossing product is on the bottom right so that we can also make make sure that our inventory is filled with those products which are giving us High Revenue so we will be using or bu total revenue right so uh we can give it an Laos as total revenue all right now we can use this particular term here order by total revenue descending DEC is good enough now this is how you will sld the products now let’s execute this particular query there you go so the car Model T okay yeah so the car model j is giving us the highest revenue next is followed by TM and sng so we are not mentioning specific if you go back to the uh table here we are not mentioning the actual car brands and actual car Nam so that we don’t want any copyrights to be faced so we are just mentioning some random names not to be too specific there now let’s proceed with our next query for the session where we want to group by state and calculate total revenue let’s edit the same comment here don’t worry if you want this uh demo document we will also link that demo document with all edit and view rights so that all the viewers can have a quick glance and try to execute these queries in their own local systems okay now let me type Down group by state and calculate total revenue there you go now let’s try to edit the same query now we want statewise revenue and we want from customer table right we want to join dealership for this particular one because dealership is the one which has some details for it so the state data right here you can see we have inserted State data California Texas so we want we want the state data so it is present in dealership table so we also want to perform a join there no worries let’s edit the same query here so we want instead of product we want state and instead of sum of Revenue uh yeah we want Revenue so we will keep it as it is total revenue as total revenue some of Revenue as total revenue from customer table and we want to perform a join operation so let’s create some space join dealership okay uh let’s copy the name so that we don’t make any confusions here dealership sorry here don’t worry we’ll make some edits down the line dealership on order ID so let’s go with the order ID which is available here Order ID equals to order ID remember the first step we did eliminate the confusions by mentioning the table names dot column name and customer name sorry the customer table name do column name on yeah we did it on dealership do order IDE equals to customer. order ID now we will be performing the group buy operation we don’t want uh the order buy Here Group by state of course in case if you wanted to you know order by the highest crossing state you could have used order by there but so far according to the use case we don’t want that so let’s continue with the same exec tion here click execute and you will be having the answer here so based on the states you have their respective revenues there you go now let’s proceed with the next use case for today’s discussion which is about using the conditional statement like case using case query or clause for custom calculations we’ll perform some customized calculations now let’s say we wanted to find out a product which is uh giving Revenue greater than 10,000 as high Revenue let’s say we have revenues in terms of thousands of dollars and let’s have a benchmark like $10,000 and $10,000 is the minimum Revenue you wanted to extract out of that product and if it is not yielding at least 10,000 for your dealership then that product is not selling much so that you can at least make some space in your dealership so that you can import some products which are giving you highest uh Revenue right so we want to find out those uh products which are giving us revenue between 5,000 to 10,000 as medium revenue and less than 5,000 as low revenue and greater than 10,000 as high Revenue you understood the game right so we have three segments High Revenue medium okay okay type of Revenue Vue and least Revenue product so that you can eliminate the least Revenue products out of your inventory now we want order ID so copy the order ID from here and paste it here so we are looking for order ID and we are also looking for product so uh we don’t want some much revenue here let’s eliminate this one and instead of that let’s add product from we’ll extract this from okay before from uh this this form from statement will be at the last here we will begin with a use case right let’s type case now when a specific product or Revenue okay let’s revenue is greater than $10,000 then let’s not use sentence case let’s use keywords and caps then mention it as high or high Revenue let’s copy paste the same code here when revenue is between between 5,000 and we will be using an and operator here then term it as okay we don’t want alter average revenue or medium revenue and copy paste the same here we remove the alter and revenue is less than okay I think we don’t want to use this instead of this we can just place else right so we will place else it should be termed as low revenue or least let’s go with low Revenue there you go and now from which table you want to extract that I want to extract all this data from customer table so everything will go off apart from that now let’s execute this particular code let’s see if we get any errors incorrect Syntax for case I think we made some mistake here okay we forgot the comma here should have mentioned a comma and yeah so the thing is we by mistake chose the alter from suggestions alter keyword from suggestions so far we missed a comma and Al from suggestions I think it’s everything good to go let’s try to execute and if it faces some issues no problem we’ll try to resolve it in a different way so incorrect we missed to write the end okay we did not end the case okay okay fine fine not a problem end as okay uh let’s term it as uh the entire uh table as Revenue category since we are uh splitting into three categories Revenue categories there you go so this is the way to learn make some mistakes that uh you can learn in a better way for the next time you’ll never make a mistake so far so good so we have all the car models categorized into the uh revenue revenue categories High Revenue low Revenue so far we have all the cars in high Revenue not a bad deal I think all the cards are performing really well maybe if you change the numbers a little bit maybe if we take up one lakh in place of 10,000 then maybe we can get a couple of costs but so far so good this is how the query works now let’s uh switch to our next query next use case where we will be combining data from multiple tables using joh we already did that but still for the sake of uh learning experience we will also perform that particular operation so we will be naming this particular use case as combine data from multiple tables using a join so far you have already have a good experience on how joins work but still we will try to do that now we will use customer table here customer table. order ID and uh we want customer table do product and customer. Revenue and uh let’s also say take some data from dealership so we already know that some data of states is in dealership so we’ll also take the dealership data so uh dealership dot State also take the region dealership. region from customer table let’s eliminate the case statement from customer and we want to join let’s push this to the first line so that we don’t have confusion how and where the query is going on so here I want to join so the second line is all about join dealership so let’s copy this we we are combining dealership with customer on order ID in the same way we will take order ID equals to order ID now which order ID is equals to which order ID the first table customer. order ID is equals to the second table dealership order ID so that SQL Server understands which columns from which tables are being joined here for what reason right so far so good we have uh given the columns that we want to have in our output which are these columns and we are joining two tables based on certain criteria but now maybe we can specifically me mention some more data let’s say we already mentioned some uh query where we wanted data for a specific region let’s try to continue that where region is equals to West there you go let’s close the single code or double code now what happens is it is trying to give us the details of customer order ID product Revenue state region from customer table and we’re going to also execute or extract the details of state and region from the dealership table and we’re trying to join to extract those data with dealership data and we are specifically extracting the data where the region is West let’s execute the data don’t worry if we find any errors in this particular code there you go we have the result so we have all the details from the west region there you go let me expand this so that we have a better view anyways it’s okay now let’s go with the sixth quarium for today’s session where we will be executing a query based on having close in SQL server and we will try to filter out some states only show the states where total revenue is greater than 50,000 just like we discussed before we initially used a case statement with $110,000 at least Revenue but now let’s increase the number to 50,000 and we want those states which are giving us minimum 50,000 Revenue so let’s uh rename the use is here we will try to name it as filter data or groups with having with having Clause okay so we want uh State we have state here and let’s also count as total orders so order ID so customer. order ID will be now count of total orders so the count will be the aggregation function here count total order IDs and we can name it as total orders and uh do we have Revenue yes we have revenue and let’s also remove the product I don’t think we might need a product here and the aggregation will be some aggregation has sum of Revenue and I don’t think we need to specifically mention it here but anyways we’ll keep State first copy State and drop it here we want State count of orders as orders and sum Revenue as total revenue what this does is it’ll give a Clarity right so instead of uh if I don’t alos it what it shows is sum of Revenue and for a generic person it might not be as helpful as a data engineer can right for a data engineer data analyst he can totally understand by just reading the agregation function so we counting the orders here we are getting the sum of Revenue but for a mere person who just wants to see the report the business guy who just wants to see the report for him total orders or uh total revenue is a simplest language that he can understand correct now we are extracting this data from customer and uh we will join dealership again okay because we also want to extract the state right so we did not mention the state here but we can mention the state anyway okay we did mention the state so we since we have the state column for extracting State details will anyway go for the dealership so we are already joined dealership data with customer data and let’s do a group by function here Group by region Group by state actually and now the condition having some of Revenue at least or greater than 50,000 so we will go with the having Clause here and sum of Revenue or you can also use the aliah’s name total revenue greater than $50,000 so let’s execute this query and see if the alas works or not okay I think alas will not work here in case of alas let’s go with the ACT ual term and place it over here and now let’s try to execute this if it works or not okay we mentioned two things here region and the state so we just wanted State there not region I think this should solve the issue 20 rows affected ambiguous column order ID now we will let’s say take customer name and place it here or I think the dealership would be the best because we have the details of orders here no no no customer table has the order details so let’s keep it that way there you go so we have uh so many number of states which have Revenue greater than 50,000 so these are the outputs there you go now let’s proceed with the next query where we will be using the range function which is also known as the between function in SQL Server so let’s name the comment as using the range function let’s not uh capitalize it using the range function named between so between is the keyword right now let’s build a use case let’s identify couple of uh States we will use the same query will not make some major differences here so we we want to identify a couple of States whose revenue is greater than 50,000 but less than one L right this makes a good use case for that for that implementation of bit function we will keep all the uh columns as they are and maybe we can also include a couple of columns maybe product as well and uh we will join two tables now I think we don’t need a group by here but in place of group by and in place of having we will specify where some so to use where Clause I mean to use between Clause having is not the right keyword where is the right keyword so Su of Revenue should be in place of the symbol between you take the suggestions and one lakh yeah this is 1 2 3 4 5 zeros so this is is the right way now let’s try to execute if it works or not if there is some error yeah there is some error an aggregate may not appear where Clause unless it is subsidary okay contain having claes select I think this is the place where we can go with the alas name let’s try that or if areas does not work then we will go with a revenue okay let’s simplify this let’s not go with the join statement here let’s eliminate the join we shall just simplify we don’t want State uh we won’t okay let’s not count this there was no need for counting I think that was one error we will go with order ID I to L we don’t want this and anyways we want to take a look at the the product and dealership name as well and we also want revenue from customer table where revenue is between these numbers let’s try to simplify and run this query think it should work yeah it worked so these are the uh dealerships and products which yield in revenue between 50,000 to 1 lakh right so this is the best way to use it so we had some extra aggregate functions which complicated the query no no problem now let’s go with some pattern matching sometimes uh let’s say we are looking for sales from California something like that or we are looking for some car model correct and we don’t know the full name or we might have a spelling mistake right uh we have California here but let’s say we don’t know the spelling of California but we know the first three or four letters of California right so in those instance what you can do is try to match the pattern that we have in our hand with the pattern which is available in the data table and wherever it finds a match it extracts those rows so this is how the pattern matching works now let’s execute a query for a better understanding let’s keep the same query use okay let’s change uh the use case here using the pattern matching in SQL Server so we will have order ID as it is dealership name as it is and product as it is from customer table where product so let’s copy this and paste it here like or I like I like is uh the opposite so let’s go with like car model let’s check with the car models first so all car models are the same so me maybe if uh we go with the fuel type I think fuel type will help because all the card models have the keyword card model and only thing is an alphabet M Etc so it doesn’t make sense for us to execute bit uh the like operator here so instead of product let’s keep fuel type like hybrid correct let’s go with the hybrid one so we will take only the first four letters let’s imagine we don’t know the full spelling of hybrid so if the M pattern is like and since it’s a text we will use uh single quotes or double quotes if the pattern H hybr matches with the elements or the column present in the customer data it will pull all those uh columns or rules now let’s execute this so there you go okay we one important thing we missed to include the percentage this percentage symbol will make SQL Server understand that the text should have hybr and after that anything is accepted so anything which has a beginning with hybr should be pulled out right now let’s execute once again and see the data there you go you have it correct so remember the symbol percentage right and in case if you did didn’t knew uh the hybrid let’s say it has some ybr in its format right it’s it has some vbr in the format anything before vbr is okay anything after vbr is okay again it will yield the same result hybrid there you go and in case if you wanted to change let’s write the name of petrol I don’t know the spelling of petrol so let’s say p e d so let’s imagine I don’t know the name of petrol so instead of petrol I’m writing eliminating p and I’m writing p e t r and anything after that now let’s run this query and see the output there you go so we have all the vehicles which are of fuel type petrol so this is how you can use pattern matching in SEL server now let’s perform some calculations with dates right so we’ll perform some date and time calculations let’s rename the comment as state and time functions and time and some mathematical math Cals now let’s say you are the owner of dealership and uh let’s say for a specific car you are losing customers initially it was using uh initially it used to perform very good like many customers used to come for that specific car and right now that specific car is receiving less orders and you order to find out what is the reason behind it and after a General survey you come to know that the number of days you took to deliver that car is growing let’s say earlier you used to deliver that car in 2 days but right now you’re taking like two months to deliver that car right so that might be the reason but you wanted to make sure that you have a solid proof that you have the number of days that you’re looking at to show your sales team why is so many number of dayses being taken to deliver a card now for that let’s go with select order ID order date you want order date for it now you can simply copy the order date here and paste it there and you also want the delivery date and copy that and paste it that remember these date and Order date and delivery date are of date data type and now you want to calculate the difference so for that you use a function called Date diff or date diff so the the you know there’s there’s two ways of calling it so if you prefer calling it as date right diff or a you call it as dated if okay so there’s two ways of calling that function so I prefer to call date diff because date difference so date diff comma sorry uh Open Bracket so we want to provide some details here so I want to provide a day I want to count the days right so I want to count of days I’m mentioning day and Order date difference between the order date and the delivery date you can specify that using a comma so I want the difference between these two in case if you want to Alas it you can also do that days to deliver from customer and we don’t want this simply place a semicolon there and now just copy this and execute there you go now you have the uh number of days that you or your sales team is taking to deliver the vehicles so and on an average you’re taking about 10 days to deliver now you can prove this to your sales team and uh let them know this is not good you want to have at least minimum 4 to 5 days or 2 to 3 days to deliver a vehicle if this goes on the say might drop and it might be a little problematic right now let’s proceed with the next use case of today’s session about the temporary tables now why temporary tables so there comes a situation where you have to just run some numbers run some something very uh not too critical but you just wanted to do that so in such scenarios what you can do is you don’t want to harm the original table so what you can do is you can create a temporary table or a copy of that table which is somewhere in the intermediate memory storage and as as soon as you close the studio it fades away and nothing happens to your original data table so that is where the temporary tables come to come into picture now let’s create a simple use case for that particular temporary tables right so we will be selecting order ID and let’s also take product and let’s also take Revenue into temp or yeah it’s enough temp order tables I don’t want that temp order and I don’t want to it and from which table are you taking that I’m taking that from customers you can either choose to keep it in in a new line or you can keep it in the same line but I want to keep it in a new line from customers and where revenue is I said you right you wanted to just explore a few things which is not too mandatory uh but you just want to take a look at it that’s why you take the option of creating U temporary tables and I want to find out which are those uh products which are giving us Revenue greater than 1 to 3 4 five1 lakh dollar right now let’s run this it’s run it’s done but we don’t know where it is so what you can do is you just write up simple select query select stock from your temporary table close the query and run it there you go so far there are no such uh products which are giving us greater than one lakh sales of that single product in valid object name temp order okay there might be some error about this particular query let’s try to reduce the number did we miss anything where revenue is greater than okay this is a number we don’t want semicolon there okay we missed a semicolon here let’s run this execute let’s keep it as 10,000 okay okay so there was no certain product which was above one lakh that was a problem okay so these are the products which are giving us U 10,000 sales at least not a problem now let’s proceed with the next uh important part of today’s session which is about the Common Table Expressions so Remember Common Table expressions are also known as CTE play a very major role in realtime data analytics right so uh let’s have a sample of that let’s create a Common Table expression which is rather simple and uh just learn how technically it works right so the only difference is the CTE start with a keyword word named as withd and after that you can term your uh comment table as some data so or some name I’ll give it give it as sales data as and open a bracket and inside this bracket is where you write your actual query now let’s organize a few things I don’t want the temp order table here and I don’t want temp order here from okay I I want to extract a few columns I want uh maybe State and I maybe want uh I don’t want order ID I want Revenue maybe revenue is good so let’s sum the revenue and uh term it as total revenue from customer and now let’s proceed with a join command where we will be joining dealership data let’s copy the dealership data table name we will be joining based on the order ID that is common so uh maybe order ID copy the order ID is equals to order ID and which order ID are you talking about I’m talking about uh customers order ID and dealership data order ID so we need to mention that on dealership. order ID and customer. Order ID Group by state good since we took State as well we can use a group by function here and this is not the end of uh everything so semicolon may have to wait so this is the first part now using this particular CTE this entire term is CTE so this particular the output of this particular query will be stored in sales data now we will make use of this CT or sales data turn to extract a few more queries so we will be writing another select statement select state from from okay let’s also take the total revenue which we created here let’s take the same term here so that we don’t make a mistake from the CT which we created very recently which happens to be the sales data where total revenue is crossing something about $50,000 and now is the semicolon let’s try to execute this there you go so a few regions or a few States and total revenue Vue which are exceeding $50,000 are there you go what is post SQL postris SQL is an open-source object relational database management system it stores data in rows with columns as different data attributes according to the DB engines ranking post SQL is currently ranked fourth in popularity amongst hundreds of databases worldwide it allows you to store process and retrieve data safely it was developed by a worldwide team of volunteers now let’s look at the history of post Christ sequel so in 1977 onwards the Ingress project was developed at the University of California Berkeley in 1986 the post Chris project was led by Professor Michael Stonebreaker in 1987 the first demo version was released and in 1994 a SQL interpreter was added to postris the first postris sequel release was known as as version 6.0 or 6.0 on January 29 1997 and since then post SQL has continued to be developed by the post SQL Global Development Group a diverse group of companies and many thousands of individual contributors now let’s look at some of the important features of postest SQL so postest SQL is the world’s most advanced open source database and is free to download it is compatible as it supports multiple operating systems such as Windows Linux and Mac OS it is highly secure robust and reliable postp SQL supports multiple programming interfaces such as C C++ Java and python postp SQL is compatible with various data types it can work with Primitives like integers numeric string and Boolean it supports structured data types such as dat and time array and range it can also work with documents such as Json and XML and finally postris SQL supports multiversion concurrency control or mvcc now with this Theory knowledge let’s look at the post SQL commands that we will be covering in the demo so we will start with the basic commands such as select update and delete we will learn how to filter data using wear clause and having clause in SQL we will also look at how to group data using the group by clause and order the result using the order by Clause you will learn how to deal with null values get an idea about the like operator logical operator such as and and or we will also explore some of the popular inbuilt mathematical and string functions finally we’ll see some of the advanced concepts in postris SQL that is to write case statements subqueries and user defined functions so let’s head over to the demo now okay so let’s now start with our demo so first we’ll connect to post SQL using psql cell so here under type here to search I’ll search for psql you you can see this is the SQL cell I’ll click on open let me maximize this okay so for Server I’ll just click enter database I’ll click enter port number is already taken which is 5432 I’ll hit enter username is already given and now it is going to ask for password so here I’ll give my password so that I can connect to my post SQL database so it has given us a warning but we have successfully connected to postr SQL all right so now to check if everything is fine you can just run a simple command to check the version of post SQL that we have loaded so the command is Select version with two brackets and a semicolon I’ll hit enter okay you can see the version post SQL 13.2 okay now let me show you the command that will help you to display all the databases that are already there so if I hit /l and hit enter it will give me the list of databases that are already there so we have post SQL there’s something called template zero template 1 and we have a test database as well okay now for our demo I’ll create a new database so first I’ll write create space database and I’ll give my database name as as SQL demo I’ll give a semicolon and hit enter you see we have a message here that says create database so we have successfully created our SQL demo database now if you want to connect to that database you can use back SL c space SQL demo there you go it says you are now connected to database SQL demo so here here we can now create tables we can perform insert operation select operation update delete alter and much more now I’ll show you how to connect to post SQL using PG admin so when you install the post SQL database you will get the SQL cell and along with that you also have the PG admin so I’ll just search for PG you can see here it has prompted PG admin I’ll click on open this will open on a web browser you can see it has opened on Chrome and this is how the interface of PG admin looks like it is a very basic interface so on the top you can see the files we have object there’s tools and we have the help section as well and here you have dashboard properties SQL statistics dependencies dependence and here on the left panel you have servers let me just expand this so it will connect to one of the databases all right so if I go back you see when I had run back/ L to display the databases it had shown me post SQL and test now you can see here we have the post SQL database and the test database all right now we also created one more database which was SQL demo so let me show you how to work on this PG admin and the query tool all right so I’ll right click on SQL demo and I’ll select query tool I’ll just show you how to run a few commands on the query tool so let’s say you want to see the version of post SQL that you are using so you can use the same command that we did on psql Cell which is Select version closed with brackets and a semicolon I’ll select this and here you can see we have the execute button so if I hit execute or press F5 it will run that query you can see we have the output at the bottom and it says post SQL 13.2 compiled by visual C++ it has the 64-bit system okay now let me tell you how to perform a few basic operations using post SQL commands so here let’s say I’ll write select five into 3 I’ll give a semicolon select this and hit F5 so this will run the query and it returns me the result that is the product of 5 and three which is 15 similarly let’s edit this let’s say I’ll write 5 + 3 + let’s say six I’ll select this and hit F5 to run it it gives me the sum of 5 + 3 + 6 which is 14 now the same task you can do it on this cell as well let me show you how to do it here so let’s say I’ll write select let’s say I want to multiply 7 into let’s say 10 you know the result it should be 70 if I hit enter it gives me 70 now this question mark column question World we’ll deal with this later all right let me go back to my PG admin again let me do one more operation let’s say this time I’ll write select 5 multiplied by and within brackets I’ll write 3 + 4 I’ll give a semicolon so what SQL will do is first it will evaluate the expression that is there inside the bracket that is 3 + 4 which is 7 and then it will multiply 7 with 5 now let me select this and I’ll hit execute so you can see 7 * 5 is 35 all right now we’ll go back to our shell and here I’ll show you how to create a table so we are going to create a table called movies on the cell that is psql cell so here we will learn how you you can create a table and then you can enter a few data into that table all right let me just scroll down a bit okay so my create command goes something like this so I’ll write create table followed by the table name that is movies next my movies table will have a few columns let’s say I want the movie ID after the column name we need to give the data type so movie ID I’ll keep it as integer so integer is one of the data types that is provided by post SQL next my second column the table would be the name of the movie so I’ll write moviecore name so all the variables or the column name should be as per SQL standards so there shouldn’t be any space between the column name so I have used underscore to make it more readable so my movie name will be of type varar or variable character or varing character and I’ll give the size as 40 so that it can hold 40 characters maximum next my third column will have the genre of the movie so I’ll write moviecore Jer again joner is of type barar I’ll give the size as let’s say 30 and my final and the last column we’ll have the IMDB ratings so I’ll write IMDb underscore ratings now the ratings will be of type real since it can have floating or decimal point values if I close the bracket I’ll give a semicolon and I’ll hit enter there you go so we have successfully created a table called movies now let me go back to my PG admin all right so here I have my database that is SQL demo I’ll just right click on this and click on refresh now let me go to schemas I’ll just scroll down a bit here under schemas we have something called as tables let me expand this okay so you can see we have a table called movies in the SQL demo database now and here you can check the columns that we have just added so our movies table has movie ID movie name Jor and ratings all right now there is another way to create a table the previous time we created using the SQL cell now I’ll tell you how to create a table using the PG admin so here under tables I’ll right click and I have the option to create a table so I’ll select table okay so it’s asking me to give the name of the table so this time we are going to create a table called students so I’ll write my table name as students all right these will be default as it is now I’ll go to the columns tab so here you can create the number of columns that you want so you can see on the right I have a plus sign I’ll just select this so that I can add a new row so my first column would be let’s say the student role number I’ll write student uncore RO number again the column name should be as per SQL standards the data type I’m going to select is integer all right now if you want you can give these constraints such as not null so that student role number column will not have any null values and I’ll also check primary key which means all the values will be unique for role numbers all right if you want to add another column you can just click on that plus sign and let’s say this time I want to give the student name as my second column so I’ll write student underscore name student name will be of type let’s say character wearing if you want to give the length you can specify the length as well let’s say 40 I’ll click on the plus sign again to add my final column the final colum would be gender so gender I’ll keep this time as type character okay now you can click on save so that will successfully create your students table there you go so here on the left panel you can see earlier we had only one table that was movies and now we have two tables so one would be added that was students so if I expand this under columns you can see we have the three columns here student rule number student name and gender you can also check the constraints it will tell you if you have any constraints so you can see it says students rule number there’s one primary key all right all right now let me run a select statement to show The Columns that we have in the movies table so I’ll write select star from movies give a semicolon and let me execute this okay so here on the at the bottom you can see we have the movie ID the movie name movie JRE and IMDb readings now the next command we are going to learn is how to delete a table so there is one way by using the SQL command that is drop table followed by the table name let’s say you want to delete students you can write drop table students and that will delete the table from the database this is one of the methods so you just select and run it now the other way is to you just right click on the table name and here you have delete slash drop if I select this you get a prompt are you sure you want to drop table students I’ll select yes so you can see we have successfully deleted our students table all right now let’s perform a few operations and learn a few more commands in post SQL so to do that I’m going to insert a few records to my movies table so for that I’ll use my insert command so I have my insert query written on a notepad I’ll just copy this and I’ll paste it on my query editor okay so let me just scroll down all right so here you can see I have used my insert command so I have written insert into the name of the table that is movies and we have the movie ID the movie name movie Jer and IMDb readings and these are the records or the rows so we have the first record as movie ID 101 the name of the movie is a very popular movie which is vertigo then we have the movie genre that is Mystery it is also a romance movie and then we have the IMDb readings the current IMDb readings that is 8. three similarly we have sank Redemption we have 12 Angry Men there’s the Matrix 7 inter staler and The Lion King so there are total eight records that we are going to insert into our movies table so let me just select this and hit execute okay you can see it has returned successfully eight records now if I run select star from movies you can see the records that are present in the table so I’ll write select star from movies I’ll select this and I’ll execute it there you go at the bottom you can see eight rows affected if I scroll this down you have the eight records of information in the movies table all right now if you want to describe the table you can go to the SQL cell and here if you write back SL D and the name of the table that is movies this will describe the table so here you have the column names this has the data type and here you can specify if there are any null values or any constraints like default constant or primary key or foreign key and others let me go back to my PG admin okay now first and foremost let me tell you how to update records in a table so suppose you have an existing table and by mistake you have entered some wrong values and you want to update those records later you can use the update query for that so I’m going to update my movies table and I’ll set the genre of movie ID 103 which is 12 Angry Men from drama to drama and crime so in our current Table we only have Jon as drama for 12 Angry Men I’m going to update this column which is the movie genre to drama and crime okay so let me show you how to do it I’ll write update followed by the name of the table that is movies go to the next line I’ll write set then I’ll give the column name which is moviecore Jer equal to I’m going to set it as drama comma crime earlier it was only drama and I’ll give my condition using the wear Clause we’ll learn where clause in a bit so I’ll write where moviecore ID is equal to 103 so here our movie ID is the unique identifier so it will first look for movie ID 103 it will locate that movie and it change the genre to drama and crime so now you can see the difference earlier we had 12 Angry Men as drama as the movie genre now if I run this update statement okay you can see we have successfully updated one record now let me run the select statement again okay so here you can see if I scroll down there you go so movie ID 103 movie name 12 Angry Men we have successfully updated the genre as drama comma crime okay now let me tell you how you can delete records from a table so for that you can use the delete command so you’ll write delete from the table name that is movies where let’s say I want to delete the movie ID 108 which is The Lion King so I’ll write where moviecore ID is equal to 108 this is one of the ways to delete this particular movie or you can give let’s say where movie name is equal to The Lion King let me select this and I’ll hit execute now if I run my select query again you see this time it has returned seven rows and and you cannot find movie with movie ID 108 that was The Lion King so we have deleted it all right next we are going to learn about we clause in post SQL so to learn we Clause I’ll be using the same movie table again let’s say we want to filter only

    those records for which the IMDB ratings of the movies is greater than 8.7 so this is my updated table now I want to display only those records or those movies whose IMDB ratings is greater than 8.7 so we’ll display 12 angry man which is 9 then we are going to display The Dark Knight which is again 9 and we are also going to display the sank Redemption which has 9.3 the rest of the movies have and IM to be rating less than 8.7 so we are not going to display those all right right so let me show you how to write a wear Clause so I’ll write select star from movies where I’ll give my column name that is IMDB ratings is greater than I’ll use the greater than symbol then I’ll pass my value that is 8.7 I’ll give a semicolon and let’s run it I’ll hit F5 there you go so we have returned the sashank Redemption The Dark Knight and 12 Angry Men because only these movies had IMDB ratings greater than 8.7 okay now let’s say you want to return only those movies which have IMDB ratings between 8.5 and 9 so for that I’m going to use another operator called between along with the wear Clause so let me show you how to use between with wear clause I’ll write select star from movies where my IMDb underscore ratings is between I’ll write 8.5 I’ll give an and operator and 9.0 so all the movies that are between 8.5 and 9.0 ratings will be displayed so let’s select this and I’ll run it there you go so we have returned the Dark Knight The Matrix the seven interal and we have the 12 Angry Men so a few of the records that we missed out where I think vertigo which has 8.3 and there’s one more all right now moving ahead let’s say you want to display the movies whose movie genner is action you can see in a table we have a few movies whose genre is action movie so you can do that as well I’ll write select star from movies where the movie genre I’m writing this time in one line you can break it into two lines as well I’ll write moviecore Jer which is my column name equal to I’ll give within single quotes action now why single code because action is a string hence we need to put it in single codes if I run this there you go so we had one movie in our table whose movie genre was action that is The Dark Knight okay now you can also select particular columns from the table by specifying the column names now here in all the examples that we saw just now we are using star now star represents it will select all the columns in the table if you want to select specific columns in the table you can use the column names so you can specify the column names in the select statement let me show you let’s say you want to display the movie name and the movie genre from the table so you can write select moviecore name Comm I’ll give the next column as moviecore Jer from my table name that is movies where let’s say the IMDB uncore ratings is less than 9.0 so this time in our result it will only show two columns that is movie name and movie JRE let me run it there you go so these are the movie names and the movie genners you can see that have an IMDB ratings less than 9.0 all right like how you sh the between operator there is one more operator that you can use with the we Clause that is the in operator so the in operator works like a r clause or an or operator so let’s say I want to select all the columns from my movies table where the IMDB ratings is in 8.7 or 9.0 if I run this it will display only those records whose IMDB ratings is 8.7 or 9.0 all right so up to now we have looked at how you can work on basic operations in SQL like your mathematical operations you saw how a select statement works we created a few tables then we inserted a few records to our tables we saw how you can delete a table from your database and we have performed a few operations like update delete and we saw how a wear Clause works now it’s time to load a employee CSV file or a CSV data set to post SQL so I’ll tell you how you can do that but first of all before loading or inserting the records we need to create an employee table so let me first go ahead and create a new table called employees in our SQL demo database so I’ll write create table my name of the table would be employees next I’m going to give my column names so my first column would be employee ID so the employee ID will be of type integer it is not going to contain any null values so I’ll write not null and I’ll give my constraint as primary key so the employee ID as you know is unique for all the employees in a company so once I write primary key will ensure that there are no repetition in the employee IDs okay next I’ll have my employee name so my employee name is going to be of type varar and I’ll give my size as 40 okay next we’ll have the email address of the employee again email address would be of type varar and the size is 40 again I’ll give another comma this time we’ll have the gender of the employee gender is again worker of size let’s say 10 okay now let’s include a few more columns we’ll have the department column so I’ll write Department varar let’s say the size is 40 then let’s say we’ll have an another column that is called address so the address column will have the country names of the employees address is also VAR car and finally we have the salary of the employee salary I’m going to keep it as type real so real will ensure it will have decimal or floating Point values okay so now let me select this create table statement and execute it all right so we have successfully created our table if you want you can check by using select star from employees let me select this and I’ll hit execute all right you can see we have our employee ID as primary key there’s employee name email gender this department address and salary but we don’t have any records for each of these columns now it’s time for us to insert a few records to our employees table now to do that I’m going to use a CSV file so let me show you how the CSV file looks like okay so now I am on my Microsoft Excel sheet and on the top you can see this is my employe data. CSV file here we have the employee ID the employee name email gender this department address and salary now this data was generated using a simulator so this is not validated and you can see it has a few missing values so under email column we have a few employees who don’t have an email ID then you can see under Department also there are some missing values here as well all right so we’ll be importing this table or the records present in this CSV file onto postr SQL all right so here in the left panel under tables let me right click and first refresh this there you go so initially we had only movies table and now we also have the employees table now what we need to do is I’ll right click again and here you see we have the option to import or export let me click on this and I don’t want to export I need to import so I’ll switch on import all right now it is asking me to give the file location so let me show you how to get the file location so this is my file location actually so my Excel file which was this is present in my e Drive under the data analytics folder I have another folder called post SQL and within the postc SQL folder I have my CSV file that is employee data. CSV so I’ll just select this you can either do it like this or you can browse and do okay now my format is CSP next I’m going to select my headers as yes and then let me go to columns and check if everything is fine all right so I have all my columns here let’s click on okay you can see I have a message here which says import undor export all right so here you can see successfully completed we can verify this by using select star from employees again if I run this all right let me close this there you go it says 150 rows affected which means we have inserted 150 rows of information to our employees table you can see we have the employee ID these are all unique we have the employee name the email we have the address and the salary let me scroll down so that okay you can see we have 150 rows of information that means means we have 150 employees in our table okay now we are going to use this employees table and explore some Advanced SQL commands now there is an operator called distinct so say if I write select address from employees this is going to give me 150 address of all the employees there’s some problem here I did a spelling mistake there should be another D if I run this again AL query will return 150 rows you can see we have the different country names under address that is Russia we have France the United States we have Germany okay and I think we have Israel as well yeah now suppose you want to display only the unique address or the country names you can use the distinct keyword before the column name so if I write select distinct address from employee it will only display the unique country names present in the address column if I run this see it has returned us six rows of information so we have Israel Russia Australia United States France and Germany all right now as I said there are a few null values which don’t have any information so you can use the isnull operator in SQL to display all the null values that are there suppose I want to display all the employee names where the email ID has a null value so I’ll write select star from employees where email is null so this is another way to use your wear Clause if I select and run this there you go so you see here for all these employee names there was no email ID present in the table so it has written us 16 rows of information so around 10% of employees do not have an email ID and if you see a few of them do not have an email ID and also they don’t have a department so if you want to know for those employees which do not have a department you can just replace where department is null instead of where email is null now if I select this okay it has written us nine rows of information which means around 5% of employees do not have a department moving ahead now let me show you how the order by Clause Works in SQL now the order buy is used to order your result in a particular format let’s say in a sending or descending order so the way to use is let’s say I want to select all the employees from my table so I’ll write select star from employees order by I want to order the employees based on their salary so I’ll write order by salary let me select and run it okay there is some problem I made a spelling mistake this should be employees let me run it again okay now if you mark the output a result has been ordered in ascending order so all the employees which have salary greater than $445,000 appear at the top and the employees with the highest salaries appear at the bottom so this has been ordered in ascending order which means your SQL or post SQL orders it in ascending order by default now let’s say you want to display the salaries in descending order so that all the top ranking employees in terms of salary appear at the top so you can use the dec keyword which means desending if I run this you can see the difference now so all the employees with the highest salary appear at the top while those with the lowest salaries appear at the bottom so this is how you can use an order by Clause okay so now I want to make a change in my existing table so here if you see under the address column we only have the country names so it would be better if we change the name of the address column to Country so I want to rename a column you can do this using the alter command in post SQL so let me show you how to rename this column that is address so I’ll write alter table followed by the table name which is employees then I’m going to use rename column address I’ll write two I want to change it to Country if I give a semicolon and hit execute it will change my column name to Country now you can verify this if I run the select statement again there you go earlier it was address column and now we have successfully changed it to Country column okay let me come down now it’s time for us to explore a few more commands so so this time I’m going to tell you how an and and an or operator Works in SQL so you can use the and and or operator along with the wear Clause so let’s say I want to select the employees who are from France and their salary is less than $80,000 so let me show you how to do it I’ll write select star from employees where I’m going to give two conditions so I’ll use the and clause or the and operator here I’ll write where country is equal to France now Mark here I’m not using address because we just updated our table and changed the column name from address to Country so I’ll write country equal to France and by next condition would be my salary needs to be less than $80,000 I’ll give a semicolon let me run this all right so it has returned 19 rows of information you can see all my country names are France and the salary is less than $80,000 so this is how you can use or give multiple conditions in a we Clause using the and operator now let’s say you want to use the or operator and let’s say you want to know the employees who are from country Germany or the department should be sales so I’ll write select star from employees where country is equal to Germany and instead of and I’m going to use or their depart M should be sales okay now let’s see the output I’ll hit F5 this time to run it all right so we have 23 row of information now let me scroll to the right you can see either the country is Germany or the department is sales you see one of them in the table so here for the first record the country was Germany the second record the department was sales again sales again for the fourth record the country is Germany so this is how the or condition works so if one of the conditions are true it will return the result it need not be that both the conditions should satisfy now in post SQL there is another feature that is called limit so post SQL limit is an optional clause on the select statement now this is used as a con ST which will restrict the number of rows written by the query suppose you want to display the top five rows in a table you can use the limit operator suppose you want to skip the first five rows of information and then you want to display the next five you can do that using limit and offset so let’s explore how limit and offset works I’ll write select star from employees let’s say I’ll use my order by Clause I’ll write order by salary let’s say in descending and limit it to five this is going to display the top five employees which have the highest salary if I run this there you go you see it has given us five rows of information and these are are the top five employees that have the highest salary okay so this is one method of or one way of using the limit Clause now in case you want to skip a number of rows before returning the result you can use offset Clause placed before the limit Clause so I’ll write select star from employees let’s say order by salary descending this time I’m going to use limit five and offset three so what this query will do is it will skip the first three rows and then it will print the next five rows if I run this there you go so this is how the result looks like okay now there is another class which is called Fetch let me show you how that works I’ll copy my previous SQL query I’ll paste it here and here after descending I’m going to write fetch first three row only so my fetch is going to give me the first three rows from the top there you go it has given us the first three rows and you can see the top three employees that have the highest salary since we ordered it in descending order of salary all right you can also use the offset along with the fetch Clause I’ll copy this again and let me paste it here now after descending I’m going to write offset let’s say three rows and fetch first five rows only so what this SQL query is going to do is it will skip the first three rows of information and then it is going to display the next five rows it is going to work exactly the same as we saw for this query let me run it there you go so these are the first five rows of information after excluding the top three rows all right we have another operator that is called as like in post SQL so like is used to do pattern matching so suppose you have a table that has the employee names you forgot the full name of an employee but you remember the few initials so you can use the like operator to get an idea as to which employee name it is now let’s explore some examples to learn how the like operator Works in post SQL so suppose you want to know the employees whose name starts with a so for that you can use the like operator let me show you how to do it so I want to display the employee name and let’s say I want to know their email IDs from the table name that is employee where since I want to know the employees whose name starts with a so I’ll write employee name like now to use the pattern is within single course I’ll write a and Then followed by percentage now this means the employee name should have an e in the beginning and percentage suggest it can have any other letter following a but in the beginning or the starting should be a if I run this so there is an error here the name of the table is employees and not employee let’s run this again there you go you can see there are 16 employees in our table whose name starts with a you can see this column employee name all of them have a letter A in the beginning okay now let me just copy this command or the query I’ll paste it here let’s say this time you want to know the employees whose name starts with s so instead of a I’ll write s so this means the starting letter should be S and followed by it can have any other letter if I run this so there are 10 employees in the table whose name starts with s okay let’s copy the query again and this time I want to know the employees whose name ends with d now the way to do it is instead of a percentage I’ll write this time percentage D which means at the beginning it can have any letter but the last letter in the string or in the name should be ending with d now let me copy and run this so there are 13 employees in the table whose name ends with a d you can see it here all right now let’s say you want to find the employees whose name contains ish or have ish in their names so the way to do is something like this so I’ll copy this now here instead of a percentage I’ll replace this with percentage ish percentage now this means that in the beginning it can have any letter and towards the end also it can have any letter but this is message should appear within the name let me run and show it to you okay so there is one employee whose name contains ish you can see here there is an ish in the last name of the employee all right now suppose you want to find the employee name which has U as the second letter it can have any letter in the beginning but the second letter of the employee name should have U now the way to do is I’ll copy this and instead of a% I’ll write underscore U followed by percent now this underscore you can think of a blank that can take any one letter so the beginning can start with a B C D or any of the 26 alphabets we have then then it should contain you as the second letter followed by any other letter or letters let me run this okay so there are 10 employees in the table whose name has a u as the second letter you can see these okay now moving ahead let me show you how you can use basic SQL functions or inbuild functions so we’ll explore a few mathematical functions now so let’s say you want to find the total sum of salary for all the employees so for that you can use this sum function that is available in SQL so I’ll write sum and inside the sum function I’ll give my colum name that is salary from my table name that is employees let’s see the result this will return one unique value there you go now this is the total salary since the value is very large it has given in terms of E now one thing to note here is if you see the output the column says sum real so this output column is not really readable so SQL has a method which can fix this that is called an alas so since we are doing an operation of summing the salary column we can give an alas to this operation by using the as keyword so if I write sum of salary as let’s say total salary then this becomes my output column you can see the difference if I run this okay you can see now in the output we have the total salary now this is much more readable than the previous one so this is a feature in Excel where you can use or give alas names to your columns or your results now similarly let’s say you want to find the average of salary for all the employees now SQL has a function called AVG which calculates the mean or the average salary if I write AVG and I can edit my alas name as well let’s see I’ll write mean salary let’s run it you can see the average salary for all the employees it’s around $81,000 okay now there are two more important functions that SQL provides us which is Max and minimum so if I write select maximum or Max which is the function name of salary as let’s say instead of total I’ll write maximum so this will return me the maximum salary of the employee let’s run it and see what is the maximum salary that is present in the salary column all right so we have 9,616 as highest salary of one of the employees similarly you can use the minan function as well I’ll just write minimum and this will return me the minimum salary of one of the employees in the table I’ll replace the alas name as minimum okay now run it this will give me the minimum salary that is present in our table so it is $ 4,685 okay now let’s say you want to find the count of Department in the employees table you can use the count function so if I write select count let’s say I want to know the distinct Department names so I can write inside the count function distinct Department as total departments from employees let’s run this this will return me the total number of departments that are there so it gives me there are departments okay now let me show you one more thing here if I write select Department from employees let’s run this okay so it has returned me 150 rows of information but what I’m going to do is I’ll place my distinct keyword here just before the call name so that I can verify how many departments are there in total there you go so there are 13 departments and one of them is null so moving ahead we’ll replace this null with a department Name by updating a table okay so now let’s update our department column so what we are going to do is wherever the department has a null value we are going to assign a new Department called analytics so earlier we have also learned how to use the update command so I’m going to show it again so we’ll write update followed by the table name that is employees I’m going to set my column that is Department equal to within single codes my name of the department would be Analytics where department is I’ll say null so wherever the department has a null value we’ll replace those information with Department that is analytics let’s run this you can see query returned successfully now let’s say I’ll run this command again and this time you can see the difference there you go so we have 13 rows of information and there is no null department now we have added a new department that is analytics okay now we are going to explore two more crucial commands or Clauses in SQL that is Group by and having so let’s learn how Group by Clause Works in post SQL so the group by statement groups rows that have the same values into summary rules for example you can find the average salary of employees in each country or city or department so the group by Clause is used in collaboration with the select statement to arrange identical data into groups so suppose you want to find the average salary of the employees based on countries you can use the group by Clause so let me show you how to do it I’ll write select I want the countries and the average salary for each country so I’ll use the average function that is AVG and inside the function I’ll pass my column that is salary I’ll give an alas name as let’s say average uncore salary from my table name that is employees next I’m going to use my group by Clause so I’ll write Group by since I want to find the average salary for each country so I’ll write Group by country name let’s give a semicolon and let me run it I’ll use F5 there you go so here on the left you can see the country names we have Israel Russia Australia United States France and Germany and on the right the second column you can see the average salary for each of these countries now you can also order the result in whichever way you want suppose you want to arrange the results based on the average salary so you can use the order by Clause after the group by Clause so I’ll write order by here you can use the alas name that is average salary this is actually average uncore salary and let’s say I want to arrange it in descending order so I’ll write DSC now let’s run this you can mark the difference in the average salary column there you go so as per our result in United States the average salary is the highest and if I scroll down the average salary is the lowest in Germany now let’s see one more example using group buy suppose this time you want to find the maximum salary of male and female employees you can do that too so let me show you how to do it so I’ll write select this time we want to find the max salary based on gender so I’ll select my gender column comma and this time I’ll use my Max function since I want to find the maximum salary for male and female employees I’ll give an alas name as maximum underscore salary from my table that is employees Group by I’ll write gender okay so let’s run this there you go you can see so one of the female employees had a highest salary of $11 19,618 while of that of a me was $ 17,6 54 all right now suppose you want to find the count of employees based on each country you can use the count function along with the group by Clause so so I’ll write the select statement select since I want to count the employees based on each country so I’ll first select my country column and then I’m going to use the count function I’ll write count empore ID from my table name that is employees I’m going to group it by country so this query will give me the total number of employees from each country you can see here Israel there are four employees in Australia there are four employees in Russia we have 80 employees in France there were 31 in United States we have 27 so on and so forth let me scroll down okay now it’s time to explore one more Clause a very important Clause that is used in post SQL that is having so the having Clause works like the wear Clause the difference is that wear Clause cannot be used with aggregate functions the having Clause is used with a group by Clause to return those rows that meet a condition so suppose you want to find the countries in which the average salary is greater than $80,000 so you can use the group by clause and the having Clause to get the result so I’ll write my select statement as select country comma I want the average salary so I’ll write AVG of salary I can give an alas name as average salary from employees now I’m going to group it by each country so Group by country column since I want to find the countries in which the average salary is greater than 80,000 so I’ll use having Clause after the group by Clause I’ll write having average of salary is greater than 880,000 now this condition cannot be specified in the wear Clause so we need a having Clause you cannot use aggregate functions along with wear Clause let me just run it now there you go so we have Russia and United States where the average salary is greater than $80,000 all right now let’s say you want to find the count of employees in each country where there are less than 30 employees so for this I’m going to use the account function first let me select the country column then I’m going to use the count function and in the count function I’m going to pass my employee ID so that we can count the number of employees from my table that is employees now if you want you can use an alas name for this as well but I’m just skipping it for the time being I’ll write Group by country next I’ll write having count of employee ID less than 30 so this will return me the countries in which there are less than 30 employees let’s run it you can see here Israel Australia United States and Germany are the countries in which there are less than 30 employees okay now if you want you can use the order by Clause as well so suppose I’ll write here order by count of employee ID so what this will do is it will arrange my result in ascending order of employee ID count there you can see we have successfully arranged our result in ascending order of employee IDs okay next we are going to explore one more feature of post SQL that is of using a case statement now in post SQL the case expression is same as IFL statement in any other programming language it allows you to add ifls logic to the query to form a powerful query now let me just scroll down and I’ll show you how to use a case statement this is very similar to your eel statement that you use on Excel in C++ in Python and or any other programming language so what I’m going to do is I’m going to write a SQL query that will create a new column and the name of the column would be let’s say salary range so I’m going to divide my salary suppose if the salary is greater than $45,000 and if it’s less than $55,000 in the new column that is salary range we are going to assign a value low salary now if the salary is greater than $55,000 and if it is less than $80,000 we are going to assign a value that is medium salary if the salary is greater than $80,000 we’ll assign a value High salary so all this we are going to do using our case expression in post SQL so I’ll start with my select statement but before that let me show you how to write a comment in post SQL so you can write a comment by giving a Double Dash comments are very helpful because they make your codes or the scripts readable I’ll write case expression in postc SQL similarly if you want you can go to the top and let’s say here you can write with Double Dash having Clause okay let’s come down so I’ll write my select statement as select I want the department the country and the salary column I’ll give a comma and I’ll start with my case statement I’ll write case when my salary is greater than 45,000 and my salary is less than 55,000 then the result would be B within single codes I’ll write low salary so this is exactly like an if else condition next I’ll write another case when salary is greater than 55,000 and salary is less than let’s say 80,000 then then the result would be medium salary and finally I’ll give my last condition that is when salary is greater than 80,000 then the result will be high salary let me write this in a single line then High salary now one thing to remember in post SQL the codes are insensitive so you can write your select statement in capital in lower case or in sentence case similarly I can write case as small C or you can write as capital c all right now moving ahead after this I’m going to write end I’ll give an alas name as salary range now this is going to be my new column in the output let me just come down after this we need to give our table name from employees I’ll order it by salary descending okay so what I’m going to do here is I’ll first select Department country and salary column from my employees table and then I’m creating a new column that is salary range and I’m specifying the range so I have three conditions here for low salary for medium salary and high salary so let’s run this and see the output there you go here you can see we have added a new column known as salary range and we have order our salary in descending order so all the highest salaries appear at the Top If I just scroll down you can see we have medium salaries here and if I scroll down further you can see these low salaries so case statements are really useful when you want to create a new column based on some conditions in the existing table all right now moving ahead we are now going to see how to write subqueries in post SQL so subqueries we write a query inside another query which is also known as nested query so suppose we want to find the employee name Department country and salary of those employees whose salary is greater than the average salary so in such cases you can use subqueries now let me show you how to write a query inside another query first I’ll write the select statement I’m going to select the employee name comma I want the department comma also want to display the country name and the salary from the employees table where my salary should be greater than the average salary so after this be salary greater than I’m going to use brackets and write my subquery that is Select average salary from employees now let me break it down for you so first we are going to select the average salary from the employees so this particular SQL statement will find the average salary from the table we’ll compare this average salary with salaries of all the employees so whichever employee has the salary greater than the average salary will display their names the department country and their original salary so if you want you can run this statement as well let me select this statement and run it for you you can see we have returned the average salary of all the employees which is nearly $81,400 employees whose average salary or whose salary is greater than the average salary all right now moving ahead this time I’m going to tell you how to use some inbuilt functions we’ll learn some inbuilt mathematical functions and string functions that are available in postris SQL so I’ll just give a comment there’s another way to write a comment instead of a Double Dash you can use the forward slash an asteris and inside the asteris you can write let’s say SQL functions and you need to close this so I’ll give another ASX and a forward slash so this is also a comment in postris SQL all right so first of all we’ll explore a few math functions so there is a function called ABS which is used to find the absolute of a value so if I write select abs of let’s say minus 100 it is going to return me positive 100 or just 100 because as you know the absolute of any value will remove the negative sign involved in that value there you go so our original input was – 100 the absolute of- 100 is + 100 next let’s see another function that is called greatest so the greatest function in postcript SQL will return the greatest number in a range of numbers so suppose I write select greatest inside the greatest function I’ll pass in a few numbers let’s say two I’m just randomly passing a few numbers let’s say 4 90 let’s say 56.5 and let’s say 70 I’ll give a semicolon let me run this you will see the greatest function will return the greatest integer value or greatest number that is present in the range of numbers that we have provided so in this case 90 was the largest number or the greatest number so we got the result as 90 again you can use an alas for each of these statements now like greatest we also have a function called least which is going to return the least number present in a range of numbers if I run this so the result is two because two is the least number that is present in this selection all right now there’s a function called mod which is going to return the remainder of a division so suppose I write select mod and this takes two parameters let’s say 54 divided 10 as you can guess the remainder is 4 and so is our result you can see it has return the remainder 54 divided by 10 the remainder is 4 all right if I scroll down now let’s see how to use the power function so I’ll write select power let’s say I want to know power 2 comma 3 which is 2 Cube that is 8 let me just run this there you go so the result is 8 you can also check let’s say power of 5 comma 3 it should be 125 all right next you can use the sqrt function that is available in post SQL to find the square root of a number I’ll write sqrt and let’s say I want to find the square root of 100 you can get guess the result the output should be 10 if I run this you can see the output here 10 let’s say I want to find the square root of let’s say 144 you can again guess the result it should be 12 let’s verify it okay there is some error let me verify it again there you go it is 12 now there are a few trigonometric functions as well you can use the S function the COS function and the tan function let’s say I want to know the sign of 0 if you have studied High School mathematics you would know the sign of 0 is 0 you can see the result it is zero let’s say you want to know s 90 if I run it you can see the output here 89 all right now there are other functions like C and floor that you can use so let me show you what the ceiling and floor function does I’ll write seiling let’s say I’ll pass my floating value as 6.45 and let me run it you can see the ceiling function Returns the next highest integer that is seven in this case since the next highest integer after 6.45 is 7 let’s see what the floor function does and let me run it as you can see the floor function Returns the next lowest integer that is six in this case or the nearest lowest integer to any provided decimal value okay now that we saw how to use mathematical functions there are a few string functions available in postr SQL so let’s explore them as well I’ll write string functions okay we scroll down cool there’s a function called character length that gives you the length of a text string suppose I write select give the function as character length and inside this function I’m going to pass in a text let’s say India is a democracy this is my text let me run this okay you can see the result here which is 20 since there are 20 characters in my string that I have provided all right now there’s another function called concat in po SQL so concat is basically used to merge or combine multiple strings so I’ll write select concat within brackets I’ll give the text string now let’s say I want to combine postest SQL I’ll give a space comma I want to merge post SQL is I’ll give another comma and write my final word that is interesting now what we have done is inside the concat function we have passed in separate strings and now using the concat function we want to merge the three strings let’s see what the result is I’ll run it all right let me just expand this you can see here we have concatenated the three string successfully so the output is post SQL is interesting okay now there are functions like left right and mid in postc SQL so what the left function does is it will extract the number of characters that you specify from the left of a string let’s say I’ll write select left and I’ll pass in my text string as India a democracy I’ll copy this and I’ll paste it here let’s say I want to extract the first five characters from my string so I’ll give five so what it will do is it will count five characters from left so 1 2 3 4 and five if I run this it should ideally print India for me there you go it has printed India for us all right similarly you can use the right function to extract few characters from the right of a string let’s say you want to extract let’s say I’ll give 12 characters from right so from here onwards it will count 12 characters I’ll change left to right now let me select this and run it so you can see here this is the output from the right it has counted 12 characters and returned a democracy okay now there is a function called repeat so the repeat function is going to repeat a particular string the number of times you specify let’s say I want to select and use my repeat function and inside the repeat function I’m going to pass in let’s say India and I want India to be displayed five times I’ll give a semicolon and run it in the output you can see India has been printed five times okay let’s scroll down there is another function a string function in postc equl called as reverse so what reverse function is going to do is it is going to print any string passed as an input in reverse order so if I write select reverse and inside the reverse function I’ll pass in my string that is India is is a democracy I’m going to use the same string I’ll copy this and I’ll paste it here I close the codes and the brackets let’s print this you can see it here India is a democracy has been printed in reverse order there you go all right now this time we explored a few inbuilt functions that are already present in postris SQL now post SQL also has the feature where you can write your own user defined functions so now we will learn how to write a function of Our Own in post SQL so let’s create a function to count the total number of email IDs that are present in our employees table so for this we’ll write a function a user defined function so let me give my comment as user defined function okay so let me start by first writing create so this is the syntax to write a function in post SQL so I’ll write create or replace function then I’ll give my function name as count emails and as you know functions have brackets then I’ll write Returns the return type as integer then an alas with dollar symbol I’ll write total emails since I’m going to display the total number of email IDs that are present in my table I’ll close the dollar symbol then I’m going to declare a variable the variable name is going to be total underscore emails this is of type integer I’ll write begin and inside begin I’ll write my select statement so I’ll write select I want to count the email IDs that are present so I’ll pass my call column name that is email into total emails from my table name that is employees I’ll give a semicolon and then we’ll write return total emails as you know user defined functions often return a value so hence we have mentioned the return statement as well and now I’m going to end my function then the next syntax would be let me just scroll down okay so here I’ll give my dollar symbol again followed by total underscore emails next I’ll write my language as post SQL so the way to mention is PL p g SQL let’s give a semicolon and end it so this is my user defined function that I have written so I created a function with the function name countor emails and this would return integer as an alas which is total _ emails we declared that variable as an integer then we started with a begin statement that has my select statement where I’m selecting the count of email IDs that are present in the employees table and I am putting the value into total _ email so I’ve have used the into keyword and this Returns the result as total _ emails and I have ended let’s run this okay there is some problem there is an typo so this should be integer okay let me run it once again there you go so youve successfully created a user defined function now the final step is to call that function now to call this function I’m going to use my select statement and the function name that is countor emails I’ll give a semicolon let’s execute this there you go so here you can see there are 134 email IDs present in our employees table now one thing to Mark is there are total 150 employees in the table but out of them 134 employees have email IDs the rest of them don’t have so they would ideally have null values all right so that brings us to the end of this demo session on post SQL tutorial let me go to the top we have explored a lot so we started with checking the version of post SQL then we saw how to perform basic mathematical operation that is to add subtract multiply then we saw how to create a table that was movies we inserted a few records to our movies table then we used our select Clause we updated a few values then we deleted one row of information then we learned how to use the we Clause we learned how to use the between operator we also learned how to use the in Operator Let Me scroll down we created a table called employees and then we learned how the distinct keyword works we also learned how to use isnull with wear Clause we learned about the order by Clause we saw how to alter or rename a column then we explored a few more examples on wear Clause we learned about and and R operator then we learned how to use limit and offset as well as the fetch operator or the fetch keyword in postr SQL moving further we learned about the like operator in SQL which was used to perform pattern recognition or pattern matching you can say here we saw how to use basic inbuilt post SQL functions like sum average minimum count maximum next we saw how to update a value in a column using post SQL update command we learned how to use Group by then we learned how to use having Clause then we learned how to use case expressions in post SQL so we saw how case expression is similar to our ifls in any other programming language we explored a few mathematical and string functions and finally we wrote Our Own user defined function so that brings us to the end of this tutorial on postris SQL now if you want to get this SQL file that we have used in the demo you can give your email IDs in the comment section and our team will share this SQL file with you over email so what exactly is a CT you ask now if you are a beginner in sequence let’s say you wanted to Club two different tables or more different tables maybe three or four right so you will be using one keyword which is join right and let’s say you may have to create a query in such a way that you have to Club different tables and you have to extract the results from one table into another and finally create a output table right so this might be sounding a little too complex so basically Al what CTE does is it acts as a temporary table right now you can write a query and save it as a CTE right and that particular resultant table from CTE will not be created but will be in the memory as a temporary data or an intermediate resultant data right now whenever you want to use a join or whenever you want to use the same query inside a bracket or inside something in your query you can just simply use the name of the CT and then the data you require the columns you require and done you will get the data now this might be a little too complicated to understand in just m words now let’s just go through the formal definition of what exactly is a CTE and what it does and then let’s quickly so it’s a little too complicated to understand it just with m words so let’s get started with a practice iCal examples but before that let’s understand a formal definition of what exactly is a CTN SQL there CTE also known as or also called as the Common Table expression or some people also are used to call it as a width expression so the keyword is withth so a comma table expression in SQL is a temporary result set that you can Define within a query as I said it helps to break down the complex queries make the the code more readable and allows you to reuse the result set multiple times within the same query just you need to use the name of the CTE in the places where you want in your query and it reduces the code length as well as the execution time now CTE are defined using the width keyword as we discussed before followed by the CTE name right so for every uh column name or anything in your set you give a name right similarly when you are using CTE in SQL you also need to give a name to the CTE and that particular name will be used in your subquery positions that will reduce the query length and execution time so you should be giving a name and the query that generates the result set the CTE is available only during the execution of that particular query or specific query right so as I said the CTE table the resultant table which is created while you are using the CTE will not be created as a permanent table in the datab base right it will be a temporary or intermediate result which will be active as long as your current query which is using the CTE is active now let’s go to the demonstration mode then we will try to create some simple queries right and and we will understand how exactly a CT can be beneficial in those situations now let’s go to the MySQL workbench this is my my SQL workbench so I have a lot of tables here we have the credit card data set we have the sakila data set SLP data set says Superstar World Etc right so we will be using the Superstar data set uh I mean the database so firstly we need to write in the query which means that I am going to use the superstore database right sorry Superstar so I uh prefer using uh smaller case or lower case for database names and column names and uh uppercase for the keywords for example here use is uppercase and Superstar is the name of the keyword right so uh that is for uh identifying or easy readability which is a keyword and which is a name right so let’s execute this query and have access to the superstore data set and in Superstore data set I have one table called as Excel data now let’s quickly check what we have in Excel data select star from Excel data here we have R the order right ID audit dat ship mode customer everything right so we have region we have uh sales quantity discount profit rate so we have a number of possibilities and number of reports that we can generate but let’s try to keep it simple let’s try to find out unique regions right select unique of regions right or just regions Exel data Group by regions so let’s quickly execute this statement and see the output or maybe we can make some modifications to it right instead of that you might want to use you might want to use distinct function so that you don’t get all 10,000 plus rows so basically uh this particular data set has about 10,000 or more rows in it and it’s not real it’s completely made up report using artificial intelligence so we use chat GPT to create 10,000 rows of data for 30 years maybe from 2000 or 2001 to up to 2030 or 31 right so we don’t want all those 10,000 plus columns sorry rows so let’s use a distinct here and uh try to exit this statement so that we get U five uh of uh the regions what we have so there you go we have um five regions as expected NorthEast Southwest and Central now you can also uh select uh kind of maybe average of sales uh maximum of sales and total sales so so uh this is bringing us somewhere we can you know try to find out regionwise sales right so region wise sales Group by years like 30 years what was the sale happened in the year 2021 sorry 2001 right we begin from 2000 or 2001 to all the way up to 2030 or 2031 right so we can see if there is an increase in the year on-ear sales a decrease in the year on year sales you can identify the best performing eror the worst performing eror right so uh this sounds like a good use case now let’s go to the code where I’ve written it as a CTE and understand the workflow so here I have uh named my CTE as sales CTE so I’m starting it with the keyword with right so with sales CTE as now this is our query right what am I doing I’m extracting so according to the data set we have the date right so the date is year month and date of that particular day right but we want just the year so we’re using the ear function to extract the Year from the date as sales ear region uh sum of sales right we want you to find out the total sales happened in that particular year as total sales from the data set Excel data and appr by a right we wanted it in increasing order so 2000 to all the way up to 230 or 20031 correct so that’s how it is and I’m saving all this as a CTE named as sales CTE now I want to select some parts of that particular CTE so I want to select sales air region total sales from sales CD which is right over here and and order it in form of sales and region right now let’s try to copy this code and run this in our workbench right now let’s Okay let me close this quickly so that we have a complete view of the code right so let’s now select all the code so now we have selected this particular code let’s try to run this and see the output there you go we okay we have the output but there is something wrong we did not get uh the ears right so all the 30 years of data here it is Group by region which is fine okay we don’t want region we want to group it by ear that’s okay and the thing is we need to fix this particular year so maybe there is something wrong with the ud date right so I think uh the database has saved this particular oh okay okay since this is generated by chart jpd maybe the data type of the date is other than data right other than date data type it may be string now we might have to do some type casting to change the data type of the audit date and let’s quickly do that so now we have updated the ear so so what we have done is just uh cast here right so we have changed the string type of date to the normal date which follows by year month and date so this is a simple type casting that you can do and uh rest everything and we’ve also added a where condition so where uh date is not added or date is equals to null then you can just uh ignore that and uh now let’s try to execute this query and we have also removed that region thing right Group by region or order by region so we want that to be ordered according to the uh year which should start with uh 2001 or the first ever year at to the last ever year according to dat set now let’s select the entire CT query and run that and check our outputs so there you go so you have the year on-ear sales from 2001 to all the way up to the year 2030 and 2031 right so that’s how the CTE or common uh table expressions and SQL or the width query in SQL can be used so welcome to the demo part of the SQL project so in this we will do digital music store analysis okay so this SQL Pro is for the beginners so what you will learn from this uh project main thing is like so what’s the objective of this project this particular project so this project is for beginners and we’ll teach you how to analyze the music playlist database and you can examine the data set with SQL and help the store understand its business growth by answering simple questions so as you can see I will show you so I have three set of questions first one is easy okay and the second one is moderate and the third one is advanced level so we have three set of questions easy set moderate and the Advan okay so every set is of three three questions I guess yes in every set there is three three questions so okay in easy one there are five so we have 5 + 3 8 8 + 3 11 we have 11 questions to solve okay from this you will understand how you can you know analyze data with SQL how you can extract something from database how you can store something like this okay so and one more thing I will show you the schema of the particular uh data set which we will you know soon we will will restore so we have the tables in this artist album track media type genre invoice line invoice customer employee ID playlist playlist track and all okay so this is the music playlist database schema so without any further Ado let me create one database so here just right click create database okay here I will write music okay and save so now our database is created okay so if you will go to schema and if you go to tables there is no tables in it means there is no there is database but nothing is there the database is empty so now what I will do just go to your database just right click here you can see the restore option okay restore so format as it is then here file name go to this music store database I will put this database Link in the description box below don’t worry open then restore process started process complete some people will face this uh that the process is failed or something okay so for that what you have to do just go to file then preferences here you have to set the path just binary path okay see I am using the 15th version okay so I have set the path here also and this also but you have to set this path is important okay if you will not set this edv Advanced server path it’s fine but this part is most important okay but for the future reference I have added on the both what you have to do you have to just see where you will find this path just go to this PC then OS then program files here you will find this post G SQL then I’m using C5 15 then bin so you have to copy this path right you have to just copy it and paste it here and then select this one after that just save you won’t find any fail thing okay the process will complete right so now let’s move forward and see the tables okay it’s still empty while just refresh it see now you can see all the you know columns in my tables okay so what I will do for the checking I will run one query here okay let me close it okay I will write here select star from album okay let me run it so now as you can see here my table is working fine everything seems good okay so now what we will do we will solve question one by one okay so the first question let’s see the first question easy one who is the senior most employee based on job title okay who is the senior most okay so I will write here like the first question is who is the Senor most employee based on job title okay so this is our question so we know we have the table name called employer so we will select that table first so I will write here Select Staff from employee so you should know uh which table should to select okay so here as you can see in this question there is you know t uh word employee who is the senior most employee based on the job title most employee means means employees and employee table right so I will run it okay so what I will do I will just select this and run it okay so now you can see there in employer there is employee ID last name first name title report levels bu date higher date and all the details of the particular okay so we will do so there is one more thing you can see the levels okay level one level two so we have to who is the senior most employee based on the job title so what I will do I will write here order by levels and decreasing order okay so first I will do so now you can see the levels are in the descending order from senior to this okay L7 to L L1 so what we want we want only one uh employee name so what I will write here limit is one okay I will copy this and done it okay so now you can see the last name is Madan moan sorry moan Madan this is last name this is first name so Mohan Manan is the senior most employee based on the job de so question first is done so the second question is which countries have the most invoices okay first I will write down the question which country has the have the most have the most invoices okay so for this what we have to do see just first check first we have to check from which table you know we will get the solution so here you can see the word invoices Okay so we have one table invoice and invoice line we have to select it from this okay so I will write here Select Staff from invoice okay so we have customer ID invoice date billing address billing city billing State and everything so here you can see we have the billing country as well okay because we need the country name so we will take this column right so I will write here so I will write select we change it select count star from the select star billing country from invoice Group by billing country so why I’m doing this group by because as you can see uh we have USA multiple times USA USA USA then Canada also and the other countries as well so from this I will get only the one okay I will group them and I will get the one fine so from this we will uh get the count so after this I I will write order by so here I will write see see descending okay let me run it so now you can see the billing this is the billing order okay so or you can see the on voices USA got the 131 and Canada 76 Brazil 61 if I will write here again the limit one what I will get see USA we got the USA so us is the country which have the most invoices okay if you will remove this limit so you will get the other country as well second in Canada third is Brazil and like this okay and the third question is what are the top three values of total invoices okay again we need the same table okay first I will write the question third question is what are are the top three values of total invoices top three value of total invoices okay I know I can just solve this question by the second one but I want to do it from the starting okay so first I will take select stuff from invoice let me run it so first we will sort the data here I will write order by total because the last you know this is a table name okay total and the descending order so first I will select so we need just the top three so first I will do everyone know limit three okay okay so here I have done I have wrote this star that is why it’s giving me the all the values if I want this only this value so I can write select total from invoice order by this okay I will say and to run it so I have this total like 23.75 999 and 19.8 and 19.8 so these are the top three values of total invoices okay so here the fourth question is which city has the best customer we would like to throw a promotional music festival in the city we made the most money write a query that returns one city that has the highest sum of invoice Total return both the city name and some of the all invoice total so let me write the question first okay I’m writing question for you know your better understanding okay question fourth which city has the best customers we would like to throw a party uh promotional promotional music festival in the city we made the most money we made the most money write a query that it does one city that has the highest sum of invoices has sum of invoices total both the city name and sum of all invoices okay so we have this question okay so which city has the best customer we would like to throw a promotional music festival in the city we made the most money write a query that returns one city that has the highest sum of invoice Total return both the city name and the sum of all the invoices okay so first what we will do we will select select stuff from invoice okay sorry we select this okay so first we will select the billing city we have to focus on this and the total in this this two table we have to just focus on okay so here I will write some of total as invoice total comma billing city from invoice so this time we will do group by pilling City because we need the city names uh then I will addite order by invoice total and the descending order seems good select some total as invoice Total Building City from invoice building okay so let me select this so as you can see the highest billing city is parag Prague and the best customer is from the parag city okay so this city has the best customer obviously parag pragu or sorry for the you know mispronunciation okay so this is how we have solved our fourth question as well okay because WR both the city name and the sum of all the inv you know these is the city names and then inv voice total okay moving forward to our fifth question which is again the long one who is the best customer the customer who has spent the most money will be the declared the best customer write a query that Returns the person who has spent the most money okay so I will write here who is the best customer the customer who has spent

    the most money will be declare the best customer so write a query right that returns that Returns the person who has spent most money okay yeah so who is the best customer the customer who has spent the most money will be declared as the best write a query that Returns the person who has spent the most money okay so for this we have to take this customer Data customer table data okay so I will write as select stuff from customer okay I will select this and I will run it okay so this is our know data table data of customer okay so we have the country facts emails state city address last name first name okay so as you can see there is nothing uh like no detail of invoice or the money okay which have spent by the customer so what we will do we will look at our schema so now what we can do if we can’t solve a particular question from with one table we have to you know join the table to the other table so here we have to join customer table to invoice table so in this you can see there is customer ID and here also customer ID so on the basis of customer ID we can join the join both the table and with the help of this total we will sort out the uh that guy okay that customer right so for this I will write here select customer Dot customer ID comma customer Dot first name comma customer dot last name because we need need the full name of that guy comma sum invoice do total as total okay okay let me can P okay I don’t need the search pad right then I will write from customer okay my bad then join invoice on customer Dot customer ID equ alss to invoice do customer ID then I need Group by okay Group by customer Dot customer ID after this uh uh let me order it by the descending order so the most you know spend customer will come up so I will write here order order by total the descending order then limit equals to one fine let me run it let’s see what output should okay okay some error is coming okay sorry okay so as you can see the customer ID is five first name is R the last name is m our m is spent the highest value 14454 0 and two so who is the best customer M our mad sorry my bad our ma right our mother has spent the most money okay so this is how we are done with our easy set of questions now let’s jump into the moderate one okay so let me write the question first for the moderate so I will write here moderate questions so these analytics skill help you in the data analytics to become a data analyst or to become a data scientist okay so the question first is write query to return okay write query to return the email qu to return the email comma first name first name comma last name and genre of all do music list okay then return your list ordered alphabetically by email starting with a okay let yeah so for this okay let me open this first yeah okay fine so first what I will do so now in this question as you can see we need the we have to return the email first name and the last name and the J of all rock music listeners so if you will see select stuff from customer okay let we run this and if I will see there is no column name genre okay if I will show you the schema of this see the genre is here and the customers is here okay we need the first name last name and the email ID and the genre okay and the genre is Will should be Rock okay so what I can do I can connect this genre with track that because here is also track ID and here is also track ID then track ID to invoice line then invoice line to invoice then invoice to customer with the customer ID okay this pattern I have to follow right so for this I will write select just copy this okay just follow the steps select distinct email comma first name comma last name from customer join invo voice on customer Dot customer ID equals to invoice do customer uncore ID then join invoice underscore line on invoice do invoice ID okay then invoice _ ID then where check ID should be in here I will do select track ID okay from track then join then join genre yeah on track dot genre dot ID equ to genre dot genre ID where this is important genre name like rock because we need as you can see right a quy to return this is this and genre of all rock music listeners okay rock right then order by email okay before that let me show you this track okay select star from track okay let me show you this table you can see the name the track ID album ID Media type genre ID okay then the composer this this this bites and the unit price right okay so you know this we have then this customer okay invoice ID we to right fine so now what I will do I will just select this and okay invoice ID okay inv voice it is ambiguous here I have to write invoice line do invoice ID okay let me now run let me run it okay one more join genre on track. genre ID there is entry for table genre but it cannot be referenced from this part of the query okay okay as you can see the have the table name is Jore ID that was the mistake okay one more JRA do name spelling mistake sorry my bad guys no shes it happens okay now you can see we have all the people who love rock music and we have the email then first name then the last name see Adan Mitchell Alexandra Roa a grber like this cam Dan Edward like this okay so there are total 59 people who loves rock music from this particular database okay now question two question two is let’s Okay first let me show you let’s invite the artists who have written the most rock music data set write a query that Returns the artist name and the total track count on the top 10 rock bands okay so let’s invite the artist who have written the most rock music in our data set so write write a query that Returns the art this name and and the total count of track count of top 10 rock band so now what we need here okay let me do this so what we need here so let’s invite the artists who have the written the most rock music first we need the artist okay and the second is rock music then we need track okay and the total count total track count means we will get from the track so here we have track column track uh table and we have the artist so now let’s see the schema part so we have we need genre okay for the you know uh rock music then we have to combine this with the track ID because JN R is there from track ID to album because we need the artist name see artist ID and artist ID so this is how we have to connect the table now so for this I will write here just follow the steps select artist dot artist ID comma artist dot name comma count artist. artist ID as number of songs because we need the total number okay who have written the most rock music number of songs find from track now we have to join album on on album do album ID equals to track dot album ID okay then we have to join the artist with artist ID so join artist column on the basis of artist AR equals to then album to album. artist ID okay so here I have joined the artist to the album colum table okay then I have to join johra to the track table with the track table okay so here I will write join genre on genre do genre ID equ to JRA ID okay sorry track ID track. J okay so here I will write where where genre dot name name like shock okay rock fine then I will Group by my B group by artist do artist ID I need the ID as well then order by order by number of songs the descending then limit I need only 10 rock bands limit will be 10 let me run it okay let me run it okay album okay now let me run it okay now you can see this guy let zeppin AR side is 22 and wrote the most songs 144 then U2 122 d purple 92 then then this this this then this okay so this is how we solved our second question right so now the third question okay return all the track names names that have a song Length longer than the average song Length return return the name and the millisecond of the each track order by the song Length okay so first I will write this question Q3 so return all the track names that have a song Length longer than the the average song length Okay as we return all the track names that have the song Length longer than the average song Length okay then return the name and milliseconds for each track fine after that order by them order by the songs with the longest s listed first okay fine so we have to return all the track names that have song length and the okay first we will find the total length of this songs then we will do the where then we will put the V Clause to find out the particular uh longest song okay so this is this we’ll do in the two you know step first you will find the average strike length Okay so I will write here select select name comma millisecond okay from track where milliseconds here I will write select average from the millisecond okay then I will write here as average track length Okay then here I will write from track after this I will write here order by milliseconds I need in the descending order okay so let me run it so now you can see see first I will uh read it again so return return all the track names that have a song Length longer than the average song Length return the name and the millisecond for each Strat order by the song with the longest song listed first okay so this is the longest song okay so we have all the songs which are the longer than the average song Length right so now moving forward we have jumped into the advanced set of questions okay so now we will do the advanced questions okay so let’s see first find how much amount spent by each customer on artist write a query to return customer name artist name and total spense okay so first we will write down the questions okay then question one question one okay find how much amount spent by each customer on art is just write a query to return customer name comma artist name comma total spend and total spent okay so how to solve this so first find which artist has earned the most according to the invoice lines okay first uh let me show you the schema okay we need the artist name we need the customer name and we need the total spend okay with the invoice line because the quantity should be there okay so first we’ll see how to join these three table artist table customer invoice and invoice line like this okay this is how we will you know join the table fine so now I will tell you the you know steps so first find which artist has earned the most according to the invoice line okay the second now use the artist to find which customer spend the most on the artist so for this query you will uh be need to use the invoice invoice line track customer album and the artist table so just remember this one is tricky because the total spent in the invoice table right let me show you so total spent on the invoice table might not be a single product so that is why I was saying we need the quantity so we need the invoice line table to find out how many each product was purchased then we have to multiply this by the price of each artist okay fine so now so this is the lengthy one I will just you know write it for you and get back to you yeah so this is how you can see okay Group by five I have wrote this you can just you know write it okay like this okay we took artist name then sum of invoice line unit price into invoice line the quantity that I showed you okay we have multiply this total with the quantity okay then we join the table track with invoice album with track artist with album okay so now let’s run it yeah so now you can see this H or queen amount spent 27 the customer ID is this okay then Nicholas scer then 18 okay we have the the everything okay customer name artist name and the total spend this is the customer Name the artist name and the total amount this spent fine so now let’s move forward to the next one which is okay okay yeah so the second one is this we want to find out the most popular music genre for each country we determine the most popular genre as the genre with the highest amount of purchase so write a query that returns each country along with the top genre for countries with the maximum number of purchases shared return all the genres okay so what I will do first I will write the question okay so we okay question two so find how the most popular music music genre for each country okay with the mine determine the most popular genre as the genre with the highest amount of purchase okay then write a query that returns each country along with the top genre for countries where the maximum number of purchase okay so so there are two parts in this question first the most popular music genre and the second is the need of data at the country level okay so we can do it from the two methods okay using CT and the using the recursive method so I will use the using City I will do this city so for that you have to write with popular genre as select count invoice line dot quantity okay as purchases comma customer dot country comma genre do name comma genre dot genre ID okay then here I will write row underscore number number then I will write over Partition by customer. country order by count voice line dot quantity okay into descending order as row number okay so from invoice line okay yeah so here I will join the tables join invoice on invoice do invoice ID equals to invoice line do invoice ID okay then again join customer on customer. customer ID do idore idals to invoice Dot customer ID fine then again we have to join track track on track. track ID equals to invoice uncore line Dot trackcore ID then join genre on genre. JRA ID okay then track do John Ry okay then I will do group by Group by 2 comma 3 comma 4 then I will do order by two then ascending order and then one to descending order okay okay then now I will write select star from popular genre where row number less than greater than one okay now let me run it so now you can see we have okay I will let me read so we have to find the most popular music genre for each country okay so now we have the Contin margentina the most popular is alternative and punk John R is this store number is this okay purchases this then the Australia this rock rock rock rock rock okay certain Rock USA Rock and everything is there right so this is how you can find the most popular music genre for each country okay the last question is the here now the last question is write a query that determines the customer that has spent the most on the music for each country write a query that Returns the country along Ong with the top customer and how much they spend okay for the countries where the top amount of spent is shared right and they provide all the customer who spend this amount okay so for this um this is like a similar to this question okay so there are two parts in this question find the most spent on music for each country and the second is the filter the data for the resp customer it’s very easy okay so okay I will write the solution okay you can check the question from there I’ll write customer with country as as uh I will here select customer do customer ID comma first name comma last name comma billing billing country comma sum should be total as total spending right then I will write zow number same over we have also written here now right the same we have to write here over then Partition by billing country order by by some total descending order as row number okay so after this I will write here from invoice you have to fetch then again the same thing we have to join the table join customer on customer Dot customer ID equals to invoice do customer ID okay then here I will write Group by by 1 comma 2 comma 3 comma 4 comma okay that’s it okay then I will write here order by four ASC ascending order comma five to descending order fine so now I will write here select start from customer with country where row number is one fine so let me run it see we have first name last name billing country total spting R number and the customer ID let me show you the question here write a query that determines okay let me make it okay yeah so write a query that determines the customer that has spent the most on the music so customer we have the customer name for each country write a query that result the country along with this so we have the country name with the top customer how much they spend we have the total spending for the countries where the top amount is shared provide all the customer who has customer who spent this amount okay so we have everything here right we have this Le from Brazil this this this this this okay with the customer so this is how you can solve these questions so till now I can say you have a good data analytics skills so for this I can say this will help you in the interview of data analyst in data science or any SQL okay picture this you are in the interview and the interviewer ask can you write a query to find the top five sales records you freeze for a moment thinking am I ready for this or not don’t worry SQL might sound complicated but it’s actually a super useful tool that lets you interact with databases have you ever wondered how all those apps and websites stores and organize their data well that’s where SQL comes in SQL which stands for structured query language is a universal language for talking to databases it’s super powerful and lets you do things like pull out specific information add new data update existing stuff or even delete things you don’t need it’s basically your magic key to manage huge amounts of information with ease exactly and if you’re aiming for a career in Tech whether it’s a database administrator data analyst or software developer SQL is a must-have skill databases are at the heart of almost every application so knowing SQL can unlock some really exciting opportunities now here’s the exciting part this video is your secret weapon to master SQL interviews we have packed it with 45 carefully chosen SQL interview questions that everything you need to raise those tough questions so we’ll be starting with the basics like how databases work and then diving into advanced query challenges and by the end you’ll be fully prepared to tackle any SQL question thrown at your way so let’s dive in and get you closer to your dream job so let’s get started so now let’s start with a SQL interview question we’ll cover every question starting from basic level to advanced level so now let’s look at our first question which is very basic what is SQL so we all know that SQL stands for structured query language and it is the language which is used talk to databases think of it like giving instructions to a computer system that stores and organizes data for example if you want to find out all the customers who ordered a specific product then SQL can help you do that with a simple command you can also use SQL to add new data like entering a new customer details into database if you want to update someone’s phone number SQL has got you covered or maybe you want to delete old records that are no longer needed SQL can handle that too here’s a quick example if you want to find all the customers in New York you could write something like select star from customers where city is equals to New York so we are using this command to find all the customers in New York remember if you want to find out all the specific data from the table you have to use the Star Command and if you want to add new customer you can just simply write in insert into customers name City and then you can also insert value name which is John or and you can just enter the specific location so SQL works the same way across many popular databases like my SQL post SQL or SQL Server which is why it’s such an important skill for anyone working with data so now let’s look at our second question which is what are the different types of SQL commands so SQL commands are like instructions you give it to a database to tell it what to do there are different types of commands and each one has a specific purpose so let me explain these in simple terms remember if an interviewer asks you such questions simply explain using the proper keywords and uh use proper definitions and you know easy language that’s it so the ddl command we have which stands for data definition language it basically defines the structure of the database for example if you want to create a table or if you want to alter a table or if you want to drop a table then we have DML which stands for data manipulation language it deals with the actual data in the database for example insert update delete all of these things then we have DCL which is data control language it will manage permissions and access control so if you want to manage permission or access control then you have to use this particular type of SQL command which is DCL which is Grant and Revo Grant will provide access rights and ROK is used to remove the access rights we also have TCL which stands for transaction control language it will manage transactions in the databases for example commit commit is used to save changes rback is used to undo changes and save point is used to create intermediate points in a transaction so for instance in a schema with customers table and an order table data definition language commands are used to Def find the table whereas data manipulation commands which is uh select insert and delete it is used to update customer or order data DCL is used to control access and TCL which is transaction control language is used to manage transactions that’s it it was very simple now let’s look at your third question which is what is a primary key in SQL a primary key in SQL is like a unique ID for each record in a table think of it as a way to ensure that no no two rows in a table have the same value remember that no two rows must have the same value it is also a rule that the primary key column can’t have empty or null value so these are the basic criteria for a key to be a primary key for example in a table of customers you have a column called customer ID as the primary key then each customer have a unique customer ID like 1 2 3 and so on this makes it easy to identify Y and retrieve specific customers from database here’s a simple example suppose we have created this table create table customers and we have given the customer ID as primary key we have given name as Vare the city name as well so the primary key will ensure that each customer ID is unique no duplicates are there no customer ID is left blank that is there should be no null values and primary keys are also important when linking tables together for example if you have orders table you can use the customer ID as a reference to connect each order to a specific customer this help maintain data Integrity across the databases now the fourth question is what is a foreign key a foreign key in SQL is like a connection or link between two tables it’s just like a field in one table that refers to the primary key in another table this creates a relationship between the tables and ensures that the data stays consistent for example let’s suppose you have two tables a customer table with a primary key called customer ID and a sales table with a field called customer ID which is a foreign key linking back to the customer ID in the customer table so here’s how it will look like we have created this table and you can see in this example that suppose we have customers and sales table so we have used this customer ID in our customer table as well so here customer ID is the foreign key and in the customer table the customer ID which we had used is the primary key so now let’s move on to our fifth question which is delete and trunk it command what is the difference between delete and truncate commands so delete and truncate commands in SQL both remove the data from a table but then they work in different ways let me break it down for you the delete command so what delete command will do is basically this is used when you want to remove specific rows from a table based on a condition for example if you want to delete all all the customers from a specific City then you have to use this delete command it will allow you to be selective but it’s slower because it logs each row deletion which also makes it possible to roll back the changes if needed if you’re using transactions moving on to trunade command trunk gate will remove all the rows from a table at once without allowing any condition for example if you just want to remove all the rows just in a one go you have to use this truncate command just simp write this query as trunk table suppose the table name is customers is much faster because it doesn’t log individual road deletions and it simply clears the entire table in one go however you can’t roll back a trunk operation in most databases once it’s done so the key differences is delete is for specific row trunk it is for clearing the entire table trunk it is much more faster because it uses fewer system resources delete can be rolled back if used within a transaction trunade usually cannot delete logs each rout deletion and trunade doesn’t so this was all for this trunade and delete commands so anytime if the interviewer asks you such questions just simply explain this now let’s move on to the sixth question which is what is a joint in SQL and what are its types so this is one of the most important question you’ll be getting to know in the interviews you’ll be asked such questions in the interviews so basically a chin and SQL is used to combine a data from two or more tables based on related column like a column key that links them together it’s just like connecting pieces of puzzles join help you see the bigger picture by merging related data for example if you have a customer table and a sales table you can use the join to see which customer placed which order by linking them through a common column such as the customer ID so you all know what a join and SQL and let’s discuss its type so joint types are basically there are four types of joint which is inner joint left joint right joint and full outer joint as well so what inner joint will do is it will combine rows from both tables where there is a match in the common column think of it as the overlapping section in the v diagram only rows that exist in both the tables are included the left join or we can call or the left outer joint it will retrieve all the rows from the left table and the matching rows from the right table remember the left joint will retrieve all the rows from the left table and only the matching rows from the right table if there’s no match the result includes null values for the right tables column think of it as including the entire left Circle in the vent diagram along with any matches in the right Circle right join or the right outer joint is similar to the left joint but it will retrieve all the rows from the right table and matching rows from the left table if there’s no match null values are included for the left table column think of it as including the entire right Circle in the vend diagram along with any matches on the left Circle then we have the full joint full joint will combine rows when there’s a match in the either table if no match is found it includes null or the missing values from the either table think of it as combining both circles in the v diagram everything from both tables are included now let’s move on to the seventh question which is what do you mean by a null value in SQL it’s very easy null value in SQL means that a column has no data it’s missing or unknown it’s not the same as an empty string or the number zero those represent actual value while null represent no value at all for example if you have a table of customers and one of the row doesn’t have a phone number then the phone number column for that row would be none see we have listed this in the table here you can see if you do not have any data just simply write none so the next question is Define a unique key in SQL so unique key in SQL ensures that all values in a column or a combination of columns are unique that is no duplicates are allowed it’s like a having a rule to make sure that no two rows in a table must have the same value in that column for example in a user table the email column can have a unique key to ensure that MO two users can register with the same email address remember the key points unlike a primary key a table can have more than one unique key unique Keys allow null values while primary keys do not so these are very important to remember so if you’re ask a difference between a primary key and a unique key just simply say that unlike primary key a table can have more than one unique key and unique key allows null values while primary key doesn’t so here is a table we have listed below that is create table users and we have given user ID as integer primary key and then we have email Vare as a unique key so here the email column is a unique key so that each email must be different it should not be the same now let’s look at our next question which is what is the database a database is organized way to store and manage data think of it like a digital filling cabinet where information is Neely arranged in tables with rows and column each row represents a record and each each column represents a specific detail about that record for example a database for a library must have a table for books then the rows could represent individual books and the columns could include the book title author and the publication year the main purpose of a database is to make it easy to store manage and quickly retrieve data whenever you need it databases are used in everything from apps and websites to banking system and e-commerce platform now let’s look at our question number 10 which is explain the differences between SQL and no SQL databases so here’s a simple explanation SQL databases are structured which means they can store in tables with rows and column like a spreadsheet they follow predefined schema meaning the structure of a data is fixed and you need to Define it before adding any data these databases are great when you need consistent and reliable data like for banking system or inventory management examples are MySQL Oracle Ms SQL post SQL Etc and SQL databases are also known as rdbms which is relational database management system let’s talk about nosql databases so nosql databases are flexible and do not use stable instead they can handle unstructured or semi structured data so no SQL database is dynamic where data is primarily stored in Json objects key value pair graph nodes Etc they don’t have a specific ific structure the such databases are mostly not preferred for performing complex query operations and the examples include mongod DB couch DB elastic search Etc so now let’s move on to question number 11 which is what is a table and a field in a SQL so a table is like a spreadsheet that stores data in organized way using rows and columns each table contains records and the details for example a table name employees could store information about employees in a company whereas a field is a column in a table and it represents a specific attribute or property of the data for example in the employees table Fields could be employee ID name and department so here’s a simple example of the table you can see here the fields name or we can say column and we also have the records or the rows we can see that so in this table the entire table is called employee each row or record stores information about one employee and each column of field represents specific details like employee ID name and the department now let’s move on to a question number 12 which is describe the select statement well the select statement in SQL is used to retrieve data from a table or multiple tables it’s like asking databases show me this specific information here’s how it works you can specify which columns you can see for example to retrieve all customer names from a customer table you can select name from customer if you want to retrieve all the data just write this query select star from customers remember I told you before in the first question we using start if you want to retrieve all the data from the table and if you want to just retrieve from a particular row or a column just simply write select name from customers the field name you can also apply filters you can use a wear Clause to filter the results for example you can write select name from customers where the city name is New York you can also sort the results use the order by to sort the data for instance to sort customers by the name you can just write select name from customers and then order by name ASC ASC means ascending order so in short the select statement lets you choose what data you want to see now let’s talk about what is a constant in SQL and name a few so if you ask this question just simply answer a constant in SQL is a rule applied to a table that ensures the data stored is accurate and consistent it also help in maintaining data Integrity by restricting what values can be added or modified in a table here are some common constraints primary key we have foreign key then we also have unique key check not null and default so we have already discussed about primary key it ensures that each row in a table has a unique identifier and the column can’t contain null values foreign key links to a column in one table to a primary key in another table to maintain relationship unique key ensures all the value in a column are distinct that is there are no duplicates the check ensures that data meets a specific condition before being inserted or updated not null ensures that a column cannot have null values the constraints are essential for maintaining reliable and valid data in your database now let’s talk about what is normalization in SQL normal I ization in SQL is a process which is used to organize data in a database to make it more efficient and reliable the goal is to reduce R deny which is duplicate data and Ure data consistency this is done by splitting a large table into smaller related tables and then linking them using relationship like primary and foreign key for example imagine a single table that stores customer details and the orders if the same customer places multiple orders then their information like name and address would be repeated for each order now using normalization you would separate this into two tables first we would have customer table which will store customer details like customer ID name and the address and then we have order table which will store order details like order ID customer ID and the order table now by linking these tables using customer ID you can also reduce duplication and ensure that any changes to customer details are updated in just one place now let’s talk about question number 15 which is how do you use the wear Clause it’s very easy so just answer the we Clause within SQL queries serves the purpose of selectively filtering rows according to a specified condition thereby enabling you to fetch exclusive those rows that align with the criteria you define for example select star from employees where department is equals to HR now let’s move on to question number 17 which is difference between Union and Union or so Union is used to merge the contents of two structurally compatible table into a single combined table the difference between union and Union all is that Union will omit duplicate records whereas Union all will include duplicate records very easy Union will omit duplicate records and Union all will include duplicate records the performance of Union all will typically be better than Union since Union requires the server to do the additional work of removing any duplicates so in cases where is certain that there are not any duplicates or we having duplicates is not a problem then we can use Union all it would be recommended for performance so now let’s move on to the question number 18 so here a table is given below and you will have to see what will be the result of a query the query is Select star from Runners where ID not in select winner ID from races so the answer is given the simp data provided the result of this query will be an empty set so the reason for this is as follows if the set is being evaluated by the SQL not in condition contains any value that are null then the outer query here will return an empty set even if there are many Runner IDs that match winner IDs in the races table question number 19 is what are indexes in SQL indexes in SQL are just like having a shortcut to quickly find data in a table instead of searching through every Row one by one an index creates a sorted structure based on one or more columns making data retrieval much more easier for example you can think of an index in a book if you’re looking for a specific topic you can go to the index at the back and find the page number in stad flipping through every page similarly in database an index help the system quickly locate the rows you need so here’s how it works if you often search for customers by the name created an index will speed up those queries you can just write create index idx customer name on customer and then the customer name the database uses the index to find the row so you just have to run a query which is Select star from customers where name is John and then you can use the index to find a row with name is equals to John much faster let’s move on to question number 20 which is explain Group by in SQL the group by clause in SQL Will Group rows with the same values in a column allowing you to apply functions like sum count or average to each group for example in a sales table to find total sales by region you just simply have to write this query which is Select region some amount as total sales from Sales Group by region so the group the sales by region and calculates the total for each it’s a quick way to summarize data by categories so now let’s talk about question number 21 which is what is SQL Alias a SQL Alias is a temporary name you can give it to a table or a column in a query to make it easy to read or work with it’s like giving a nickname to something for clarity for example if you have a column named first name you can use an alias to rename it as first name in the query results you just simply have to write this query as select first name as first name in capital letter last name as last name from employe here the as keyword assign the Alias and the output will show The Columns as first name and last name aliases are also useful for tables so for this you can just write the code AS select e first name from Department table so this shortens table name for easier referencing alyses are not permanent they only exist while the query is running now let’s talk about the question number 22 which is explain orderby in SQL so you can answer this question like the order by clause in SQL is used to sort the result set of a query based on one or more columns you can specify each column sorting order ascending or descending for ascending you have to use ASC and for descending you have to use the ESC okay so just have to Simply write this query as select star from product order by Price DEC now let’s talk about question number 23 which is differences between where and having in SQL the where Clause is employed to restrict individual rows before they are grouped such as when filtering rows prior to a group by operation conversely the having Clause is utilized to filter groups of rows after they have been grouped like filtering groups based on aggregate values the having Clause it cannot be used without the group Clause whereas the where Clause specifies the criteria which individual records must mean the selected query it can be used with the group by Clause question number 24 is what is view in sec one more important question so and SQL view is essentially a virtual table that will derive its data from the outcome of a select query view serve multiple purposes including simplifying intricate queries enhancing data security through an added layer and enabling the presentation of targeted data subsets to users all while keeping the underlying table structur hidden now let’s move on to question number 25 which is what is a store procedure so if you asked this question just simply say a sequel stored procedure comprises of prec compiled SQL statements that can be executed together as a unified entity these procedures are commonly used to encapsulate business logic improve performance and also ensure consistent data manipulation practices that’s it now let’s move on to question number 26 which is one more important question which is what what is triggers in SQL a SQL trigger consists of a predefined sequence of actions that are executed automatically when a particular event occurs such as when an insert or delete operation is performed on a table triggers are employed to ensure data consistency conduct auditing and streamline various tasks so you can use insert trigger update Trigger or delete trigger accordingly now let’s talk about what are the aggregate functions and if you know them name a few it’s very easy to answer aggregate function and SQL perform calculations on a set of values and return a single result at first we have minimum which will get the minimum value from the resultant set then we have the max function which will give you the maximum value from the resultant set the sum will give you the sum of values from the resultant set average will give you the simple average of the resultant set and the count will count of numbers records from the resultant set now let’s talk about question number 28 which is how do you update a value in SQL the update statement serves the purpose of altering pre-existing records within a table it involves specifying the target from the update the specific columns to be modified and the desired new values to be applied for example if you want to update you can use Query like update employees set salary is equals to 6,000 where the department is ID now we’ll be moving on to some intermediate mediate SQL interview question and answers so one of the question is what is a self join and how would you use it I would like to repeat again these join types of question is very important these are often asked in interviews so talking about what is a self joint a self join and squ is a type of join where a table is joined with itself it’s useful for comparing rows with the same table or exploring hierarchal relationship such as finding employees and the managers in an organization so imagine if you have an employee table so you have employee ID name and the manager ID so if you want to find each employee and the manager you can use a self jooin you can just simply write a query as select e name as employee M name as manager from employee left join employees on manager so I’ve already discussed with you before what is the meaning of Left Right and self jooin so here the table joined with itself using manager ID to link each employee to the manager a self joint is helpful for comparing rows in the same table or working with hierarchial data so now let’s move on to question number 30 which is explain different types of joints with example at first we have inner joint the inner joint will gather rows that have matching values in both the tables then we have the right joint it will gather all the rows from the right table and any matching rows from the left table left join will gather all the rows from the left table and any matching rows from the right table and the full joint will gather all rows where there’s a match in either table including unmatched rows from both the tables very easy now let’s move on to question number 31 which is what is subquery and provide it using an example so subquery basically refers to a query that is embedded within another query serving the purpose of fetching information that will subsequently be employed as a condition or value within the encompassing out a query so you can just use this uh query which is Select name from employees where salary is greater than select average from salary from employees now the next question is how do you optimize SQL queries so basically the answer to this question would be something like SQL query optimization involves improving the performance of SQL queries by reducing resource usage and execution time strategies include using appropriate indexes optimizing very structured and avoiding cost operations like fully table scans now let’s talk about question number 33 which is what are correlated subqueries it’s a type of subquery that makes reference to columns from the surrounding outer query this subquery is executed repeatedly once for each row being processed by the outer query and its execution depends on the outcomes of the outer query now we’ll be talking about what is a transaction in SQL and it’s very important one of the most important question asked every time in SQL interview questions so basically a transaction in SQL is a group of one or more SQL commands that are treated as a single unit it ensures that all the operations in the group either succeed completely or fail entirely this guarantees the Integrity of the database imagine you’re transferring money from your bank account to a friend’s account that the bank first deducts the amount from your account account and then it adds the same amount to your friend’s account these two steps together form a transaction if one of these steps fails example the system crashes after deducting money from your account but before adding it to your friend’s account then the entire transaction is rolled back meaning no money is transferred and the database returns to its original state so you can also explain this question with the help of example that would be more you know clear to the interviewer now let’s talk about what are asset properties in SQL so basically asset stands for atomicity consistency isolation and durability and these are Key properties that ensures database transactions are reliable and maintain data Integrity atomicity you can think of it as All or Nothing a transaction is a single unit of work if any part of the transaction fails then the entire transaction is rolled back and no changes are made to the database for example if you’re transferring money between two accounts either both the debit and credit operations happen or neither does the second we’re going to talk about is consistency the database must always be in valid State a transaction takes the database from one valid state to another following all the rules and constraints for example if a transaction adds a record that violates a rule like a duplicate primary key then the transaction fails key keeping the database consistent isolation transactions don’t interfere with each other even if multiple transactions are running at the same time each transaction works as if it’s the only one happening example if you two people are updating the same record then one transaction will wait until the other is complete talking about durability once a transaction is committed it’s permanent even if there’s a power outage or system failure the data is saved and it won’t be lost after you complete an online purchase the transaction is stored securely even if the server crashes immediately after so this was for the asset properties and now we’ll be moving on to our next question which is how to you implement error handling in SQL error handling in SQL is a process to manage and respond to errors that occur during query execution different database system have specific ways to handle errors in SQL server the TR catch block is commonly used the tri block contains the main operation while the catch block handles errors if they occur for instance in a transaction you can use roll back in a catch block to undo changes if something goes wrong similarly in Oracle the exception block within PL SQL is used to handle errors if an error arises the exception block executes rolling back the transaction and the logging the error message by implementing error handling you ensure that operations fail gracefully without corrupting data making the database operations more reliable and secure next question which is describe the data types in SQL SQL supports various types of data types which Define the kind of data a column can hold these are broadly categorized into numeric character data type and binary types so we have numeric data types like integer float then we have character string like Car Bar we also have uni code character string like N N Text then we have binary which includes binary image date and time which includes date and date and time then we also have some miscellaneous data types which is XML and Json so the next question is explain normalization and denormalization often this question is asked in this way also or it could be asked something like explain the difference between normalization and denormalization so to answer this you have to just simply explain what normalization is which I have already discussed before once again I’m seeing you normalization and denormalization are ways to organize data in a database normalization is all about breaking big tables into smaller ones to remove duplicate data and improve accuracy for example instead of repeating customer details in every order you create one table for customers and another for orders linking them with a key denormalization on the other hand is when you combine or duplicate data to make it faster and retrieve for instance you might add customer details directly to the c table so that you don’t need to join tables during a query normalization help you space and maintain consistency while denormalization makes data retrieval quicker depending on what the database needs let’s move on to a next question which is what is a clustered index it’s very easy just simply answer by saying that a cluster index in SQL determines the phys physical order of the data rows in a table each table can have only one clustered index which impacts the table storage structure rows in a table are physically stored in the same order as the clustered index key now we have next question which is how do you prevent SQL injection so talking about this question SQL injection is a security risk where attackers insert harmful code into SQL queries potentially accessing or tampering it with your database to prevent this you can use parameterized queries or repair statements to handle the user input safely you can validate inputs to allow only expected values used store procedures to separate logic from data limit database permission non Escape special characters these steps help you secure that your database is free from SQL injection attacks the next question on the list is explain the concept of database schema in SQL a database schema functions as a conceptual container for housing various database elements such as tables views indexes and procedures its primary purpose is facilitate the organization and segregation of these databases elements while specifying their structure and interconnections next question is how we data Integrity insured in SQL just simply answer by saying that data Integrity in SQL is ensured through various means including constants example primary Keys foreign Keys check constants normalization trans actions and referential integrity constants as well these mechanism prevent invalid or inconsistent data from being stored in the database question number 42 which is what is an SQL injection we have already discussed about how we can protect our data from SQL injections so now let’s discuss what is basically a SQL injection so SQL injection in cyber security attack that involves insertion of malous SQL code into applications in input fields or parameters this unauthorized action enables attackers to illicitly access a database extract confidential information or manipulate the data the next question is how do we create a stored procedure you use the create procedure statement to create a stor procedure in SQL a stor procedure can contain SQL statements parameters and variables so here’s a very simple example you can just simply create by writing this query as create procedure get employ by ID add employee ID integer as begin select star from employees where employee ID is equals to add employee ID and then you have just have to write end that’s it so next question is what is a deadlock in SQL and how it can be prevented one more important question often asked an interview so you have to answer something by saying that a deadlock in SQL happens when two or more transactions are stuck because they are waiting for each other to release resources it’s just like two people trying to go through a narrow door at the same time each refusing to step back and let the other pass transaction a locks table one and weights to access table two transaction B locks table two and weights to access table one this is just a simple example so we can see that both the transactions are waiting for each other neither can proceed creating a deadlock so it’s very simple and how we can prevent this deadlock is by locking hierarchies always access resources in the same order so that transactions don’t block each other timeouts set a time limit for transaction to wait out for the resources you can also use deadlock detection and resolution system to detect Deadlocks and cancel one transaction and let the other proceed now let’s move on to a last question on the list which is difference between in and exist in basically works on list result set it doesn’t work on subqueries creating a virtual table with multiple columns Compares every value in the result list performance is comparatively slow of a large result set of subquery whereas the exist works on Virtual tables it is used with correlated queries exist comparison when matches found and the performance is comparatively fast for larger result set of subquery so guys that’s it for this video on the top 45 SQL interview question asked in SQL interviews ever wondered how seems to know exactly what you want before you do that’s the magic of data analytics imagine you’re shopping for a camera and suddenly Amazon suggests the perfect lens tripod and memory card all before you even think of them it’s not magic but the power of analyzing massive data sets to track what millions of Shoppers like you search for and buy together this helps Amazon create a personalized shopping experience that boosts sales and keeps your coming back from predicting Trends to fine-tuning their stock Talk data analyis is a secret Source behind their seamless shopping experience hey everyone welcome back to Simply n’s YouTube channel today we have got an exciting topic lined up the top 10 data analytics certifications I will be walking you through the expanding scope and financial growth of data analytics worldwide why pursuing a data analytic certification is essential and finally the top 10 data analytics certifications that can supercharge your carrier that can open doors to exciting opportunities let’s Dive In and explore the world of data analytics together now let us explore the expanding scope and the financial growth of data analytics the scope of data analytics is worst promising Financial growth and Rising salaries for data analytics scientists and Engineers as Industries digitalize demand surges and finance for fraud detection healthc care for predictive diagnosis retail for personalized marketing and Manufacturing for productive maintenance Innovations like augmented analytics and realtime processing enhances importance companies like Google Amazon Microsoft and IBM consistently higher analytics experts in India entry level salaries range from 4 to six lakhs with perom with experienced professionals earning 10 to 20 lakhs perom in USA entry level salaries are1 60,000 to1 80,000 with experience roles at do$ 100,000 to1 15,000 plus the future promises greater advancements making data analytics a lucrative field with work potential now let us see why is pursuing a data analytics certification essential pursuing a data analytics certification is crucial as it validates your expertise boost your credibility and lights up your resume in a competitive job market certifications provide you with in demand skills like data visualization statistical analysis and machine learning keeping you current with the industry Trends they can lead you to paying high paying job roles and career growth as employers favor certified Professionals for job data driven positions whether you’re starting or advancing your career or certification showcases your commitments and skills enhancing job prospects in fields like Finance Healthcare retail and Tech as well so all right guys the moment you have been waiting for is here it’s time to reveal the top data analytics certifications by simply learn buckle up and let’s dive into this carrier boosting programs that will set you on the path of success coming to the number one that is a post-graduate program in data analytics boost your career with simply Lars postgraduate program ineda analytics offered in partnership with bir University and in collaboration with IBM this comprehensive 8mon live online course is perfect for professionals from any background and covers crucial skills like data analysis visualization and supervised learning using python R SQL and powerbi the program features master classes by Purdue faculty and IBM experts Hands-On projects with real world data sets from Google Play Store lift and more and exclusive hackathons and AMA sessions receive joint certifications from Padu and simply learn IBM recognized certificates and benefit from carrier Support Services like resum building and job assistance through simply learns job assist no prior experience required just a bachelor’s degree with at least 50% marks is required enroll now to gain industry relevant experience and stand out to the top employers like Google and Amazon to check for the coast Link in the description box and pin comments below now moving on to the number two that is calch postgraduate progr in data science Advance your career with simply learns postgraduate program in data science in collaboration with calch ctme and IBM this comprehensive 11 month live online course covers essential skills and tools including python machine learning data visualization generative AI promt engineering chat juty and more with master classes by Caltech instructors and IBM experts you will G hands-on experience to 25 plus industy Rel projects Capstone projects across three romens and seamless access to integrated Labs on a tees program completion certificate and up to 14 counting education units from CTIC ctme along with the NY recognized IBM certificates enhance your career with job assistance master classes and exclusive hackathons with no prior work experience required this program is suitable for professionals from any background who hold a bachelor’s degree enroll now to become a data science expert and stand out to top employers to check for the course Link in the description box below and pin comments now moving on to the number third that is professional certificate programming data analytics and generative Advance your career with professional certificate program in data analytics and generative AI by simply learn in collaboration with E and ICT Academy IIT goti and IBM this comprehensive 11mon live online program is designed to equip you with cutting a skills in data analytics and generative AI covering essential tools like SQL Excel python W power VI and more learn from distinguished I faculty and IBM experts through interactive master classes Hands-On projects and Capstone experiences gain practical expertise with exposure to jni tools such as chaty and Gemini and earn industry recognized certifications from IVM along with the executive alumni status from I goti enhance your Professional Profile with simply learn job assess resume building and job placement support to get noticed by the top hiring companies enroll now to elevate your career and join network of Industry leaders do check for the co Link in the description box below and pin comments moving on to the number four that is professional certificate course in D s Master data science with a professional certificate course in data science by simply learn in collaboration with ICT Academy I kpur this comprehensive 11 month live online program equips with essential skills and tools such as python power BW chat jity and more benefit from the master classes delivered by distinguished IIT kpur faculty gain practical experience with 25 plus Hands-On projects and access integrated La for real world training with dedicated modules on generative AI prompt engineering and explainable AI you will stay ahead in the rapidly evolving AI landscape ear a prestigious program completion certificate from E and ICT Academy IIT kpur and take advantage of Simply Lars job asset to enhance your Professional Profile and stand out to recruiters apply now to enhance your career in data science and AI do check for the course Link in the description box below and pin comments now moving on to the fifth one that is the postgraduate program in data science supercharge your career with the postgraduate program in data science by simply learn in collaboration with bird University and IBM ranked as the number one data science program by Economic Times this 11 month live online program equips with with the in demand skills including python machine learning deep learning NLP data visualization generative Ai and chargeability benefit from the master classes led by Purdue faculty and IBM experts engageing Hands-On training with 25 plus projects and free Capstone projects and gain access to Industry leading tools such as T flow carers powerbi and more earn dual certificates from perue University online and IBM boosting your Professional Profile and carrier prospects the simply learns job assess receive guidance and resume support to stand out to the top employers applications close on November 8 2024 and enroll now to transform your career in data science and AI to check for the course Link in the description box below and pin comments now moving on to the sixth one that is applied Ai and data science Advance your career with applied Ai and data science program offered by Brown University’s School of Professional studies and collaboration with simply learn this 14 week CPL program empowers you with essential skills in AI generative Ai and data science including handson learning and Industry Rel projects learn from Steam Brown faculty through top not video content and monthly live master classes covering tools and Concepts such as python machine learning neural lent walking and jpt models benefit from a curriculum design to refine your expertise supported by integrated labs and exclusive content on generative AI andn a prestigious certificate of completion from Brown University and a credly badge upon program completion enhance your profile with simply L job asset resumee building support and exclusive I IM job membership to stand out in today’s competitive job market enroll now to gain The Cutting age knowledge and take your carrier in Ai and data science to the next level do check for the course Link in the description box below and pin comments now moving on to the next that is the data analyst elevate your career with simplys data analyst certification rank number one by carrier Karma this comprehensive 11 month program is designed to transform you into a data analytic expert with practical training and SQL R python data visualization and predictive analystics learn through live interactive classes Capstone projects and 20 plus Hands-On projects that ensure Real World Experience G industry recognized certifications from Simply learn and IBM access exclusive master classes and am sessions by IBM experts and receive dedicated job assistance to help you stand out to the top employers like Amazon Microsoft and Google start your journey to becoming a data analytics professional today with simply learns trusted and robust training program to check for the course Link in the description box below and pin comments now moving on to the next one that is data scientist Advance your career with simply learns industry leading data scientist certification program now ranked number one by carer Karma this 11 month course in collaboration with IBM equips you with the essential data science skills including python SQL machine learning generative Ai and W gain practical Real World experience to 25 plus Hands-On projects and a Capstone project benefit from master classes by IBM experts interactive live sessions led by industry professionals and lifetime access to the self placed learning content simply lears job assess program further boost your carer prospects helping you stand out to thep employers like Amazon Microsoft and Google to check for the course Link in the description box below and pin comments now moving on to the second last one that is the professional certificate program in data engineering launch your data engineering career with simply launch professional certificate program in data engineering offered in partnership with P University online this 32e program accuses with the indman skills covering python SQL nosql Big Data AWS Azure and snowflake fundamentals aligned with industry recognized certifications like AWS certified data engineer Microsoft 203 and snow Pro core this course ensures comprehensive learning through live online classes practical projects and a Capstone experience gain access to puru Alumni Association exclusive master classes and simplys job asset for carer support join now to become a certified data engineer and FASTT trck eradio to high impact roles in the field do check for the course Link in the description box below and pin comments now moving on to the last but not Le is Microsoft certified as your data engineer associate dp23 Advanced your carer will simply learns Microsoft certified Azure data engineer associate dp23 training aligned with official certification Master essential Azure skills like data integration transformation and storage while gaining hands-on experience with the key services such as Azure signups analytics data Factory and Azure data braas benefit from live online classes led by Microsoft certified trainers access to official Microsoft handbooks practice lab and comprehensive practice test to help you excellent dp23 exam this course designed for real world application ensures you develop job ready skills and earn a official course completion batch hosted on the Microsoft learn portal enroll now to elevate your data engineering expertise do check for the course Link in the description box below and pin comments so getting a data analytic certification can be a game changer for your growth however choosing the right certification is crucial it’s like finding the perfect key to unlock your potential select the one that best aligns with your career goals and S SK to maximize your journey in data analytics so that’s a WRA so that concludes our SQL full course if you have any doubts or question you can ask them in the comment section below our team of experts will reply you as soon as possible thank you and keep learning with simply staying ahead in your career requires continuous learning and upscaling whether you’re a student aiming to learn today’s top skills or a working professional looking to advance your career we’ve got you covered explore our impressive catalog of certification programs in cuttingedge domains including data science cloud computing cyber security AI machine learning or digital marketing designed in collaboration with leading universities and top corporations and delivered by industry experts choose any of our programs and set yourself on the path to Career Success click the link in the description to know more hi there if you like this video subscribe to the simply learn YouTube channel and click here to watch similar videos to nerd up and get certified click here

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Beauty Experts Say You Should Never Make These 50 Common Mistakes

    Beauty Experts Say You Should Never Make These 50 Common Mistakes

    When it comes to beauty, even the smallest mistakes can have lasting consequences. Many people unknowingly sabotage their skincare, haircare, and makeup routines by following outdated advice or skipping essential steps. The result? Premature aging, hair damage, and ineffective products that fail to deliver the desired results. To maintain a radiant and youthful appearance, it’s crucial to learn from the experts and avoid these common beauty blunders.

    Beauty professionals stress that a well-informed approach to self-care makes all the difference. From using the wrong skincare ingredients to applying makeup incorrectly, minor missteps can undermine your efforts. Renowned dermatologist Dr. Whitney Bowe notes, “Your skin is a reflection of your overall health and habits.” This means that understanding proper techniques and choosing high-quality products tailored to your needs is essential for achieving long-term beauty goals.

    By steering clear of these 50 common beauty mistakes, you’ll not only enhance your natural glow but also protect yourself from unnecessary damage. Whether it’s over-exfoliating, neglecting sunscreen, or using the wrong hair treatments, small changes in your routine can lead to significant improvements. Let’s dive into these expert-backed tips to ensure your beauty regimen is working for you—not against you.


    1 – Letting Brassy Tones Mess With Your Blonde Color

    Nothing ruins a gorgeous blonde shade faster than brassy, yellow undertones. Many people assume that simply using a purple shampoo will fix the problem, but the reality is more complex. Brassiness often occurs due to sun exposure, hard water, or the natural fading of hair dye. Celebrity colorist Tracey Cunningham advises incorporating a color-protecting treatment into your routine and limiting heat styling to maintain the integrity of your blonde.

    To keep your blonde looking fresh, opt for a sulfate-free shampoo designed for color-treated hair. Additionally, consider using a blue or violet-toned mask once a week to counteract any unwanted warmth. Hairstylists also recommend rinsing your hair with filtered water or using a showerhead filter to reduce mineral buildup. By implementing these preventive measures, you can keep your blonde locks vibrant and salon-fresh.


    2 – Letting Reddish Tones Mess With Your Brunette Color

    Brunettes often struggle with unwanted red or orange undertones, especially after repeated exposure to heat styling and environmental pollutants. Many people don’t realize that their hair care routine could be exacerbating the issue. Using the wrong shampoo or excessive heat tools can strip cool-toned pigments from brown hair, leaving behind an unflattering reddish hue.

    To maintain the depth and richness of brunette hair, experts suggest incorporating a blue-tinted shampoo to neutralize warmth. Investing in heat protectant sprays and minimizing direct sun exposure can also prevent color shifts. For an extra layer of protection, hairstylists recommend scheduling gloss treatments every few weeks to refresh and enhance your natural or dyed brunette shade.

    3 – Applying Your Body Self-Tanner to Your Face

    Many people make the mistake of using their body self-tanner on their face, leading to clogged pores, breakouts, and an uneven complexion. Body tanners are often formulated with heavier ingredients that can be too harsh for delicate facial skin. Dermatologist Dr. Hadley King warns that “self-tanners designed for the body often contain higher concentrations of DHA, which can lead to excessive dryness and irritation when applied to the face.”

    To achieve a natural, sun-kissed glow without damaging your skin, opt for a self-tanner specifically formulated for facial use. These formulas are typically non-comedogenic and infused with hydrating ingredients like hyaluronic acid and vitamin E. Additionally, applying a lightweight moisturizer before self-tanner can help create a more even finish and prevent patchiness.


    4 – Over-Exfoliating With Physical Scrubs

    Exfoliation is key to a glowing complexion, but too much of a good thing can be harmful. Many people overuse harsh physical scrubs, leading to micro-tears in the skin, increased sensitivity, and premature aging. Board-certified dermatologist Dr. Shereene Idriss explains, “Over-exfoliating disrupts the skin barrier, making it more susceptible to inflammation and irritation.”

    Instead of scrubbing aggressively, switch to a gentler exfoliation routine. Experts recommend using chemical exfoliants, such as glycolic or lactic acid, which dissolve dead skin cells without causing abrasions. If you prefer physical exfoliation, opt for a fine-grain scrub and limit usage to two to three times per week. Protecting your skin barrier ensures a smoother, more radiant complexion in the long run.


    5 – Relying on the SPF in Your Makeup Products

    Many people believe that using foundation or powder with SPF is enough to protect their skin from harmful UV rays, but this is a dangerous misconception. According to the Skin Cancer Foundation, “most cosmetic products with SPF do not provide sufficient coverage unless applied in very thick layers, which is unrealistic.”

    For proper sun protection, always apply a broad-spectrum sunscreen with at least SPF 30 underneath your makeup. Look for lightweight, non-greasy formulas that layer well with other skincare and makeup products. Reapplying sunscreen throughout the day—especially when spending time outdoors—is also essential to prevent sun damage and premature aging.


    6 – Skipping Toning After Cleansing

    Toner is often seen as an optional step, but skipping it can leave your skin unbalanced and vulnerable to irritation. After cleansing, your skin’s pH levels can become disrupted, making it more prone to dryness, oiliness, or breakouts. Skincare expert Dr. Dennis Gross explains, “A well-formulated toner helps restore balance, tighten pores, and enhance the effectiveness of the rest of your skincare routine.”

    To reap the benefits, choose an alcohol-free toner suited to your skin type. Hydrating toners with ingredients like rose water or glycerin help soothe dry skin, while clarifying toners with witch hazel or salicylic acid are ideal for oily and acne-prone skin. Incorporating toner into your routine ensures your skin stays balanced and prepped for serums and moisturizers.


    7 – Layering Setting Powder on Dry Skin

    Using setting powder can help makeup last longer, but when applied to dry skin, it often accentuates fine lines and flakiness. Many people make the mistake of layering powder without properly prepping their skin, leading to a cakey, dull appearance. Makeup artist Bobbi Brown advises, “The key to flawless makeup is hydration—powder should enhance, not highlight dryness.”

    To avoid this issue, start with a well-moisturized base. Apply a hydrating primer before foundation and use a light hand when applying setting powder. Opt for finely milled, translucent powders that set makeup without settling into lines. Additionally, using a damp beauty sponge instead of a brush can help distribute powder more evenly for a natural, smooth finish.

    8 – Over-Cleansing Oily Skin

    Many people with oily skin believe that washing their face multiple times a day will control excess oil, but this can actually have the opposite effect. Over-cleansing strips the skin of its natural oils, triggering the sebaceous glands to produce even more oil as a defense mechanism. Dermatologist Dr. Joshua Zeichner explains, “When you over-cleanse, your skin tries to compensate by producing more oil, leading to breakouts and irritation.”

    To maintain a balanced complexion, use a gentle, sulfate-free cleanser no more than twice daily. Look for ingredients like niacinamide or salicylic acid, which help regulate oil production without over-drying the skin. If your skin feels tight or uncomfortable after cleansing, you may need to switch to a more hydrating formula to support your skin barrier.


    9 – Removing Mascara With Cotton Pads

    Using cotton pads to remove mascara may seem harmless, but it can cause unnecessary tugging on the delicate eye area, leading to premature wrinkles and lash breakage. The friction created by rubbing back and forth can also irritate the skin and leave behind mascara residue. Skincare expert Dr. Dendy Engelman warns, “The eye area is the first place to show signs of aging, so it’s crucial to treat it gently.”

    Instead of cotton pads, opt for a gentle, oil-based makeup remover or micellar water on a reusable microfiber cloth. Apply the remover to closed eyes, let it sit for a few seconds to break down the mascara, then gently wipe away without rubbing. This method protects your lashes and the sensitive skin around your eyes while effectively removing all traces of makeup.


    10 – Skipping Moisturizer on Oily or Acne-Prone Skin

    Many people with oily or acne-prone skin believe that skipping moisturizer will prevent breakouts, but this is a major skincare mistake. When the skin lacks hydration, it compensates by producing even more oil, potentially leading to clogged pores and acne flare-ups. Dermatologist Dr. Whitney Bowe explains, “Moisturizing is essential—even for oily skin—because it helps maintain the skin barrier and prevents overproduction of sebum.”

    To keep your skin hydrated without feeling greasy, choose a lightweight, oil-free moisturizer with ingredients like hyaluronic acid, glycerin, or niacinamide. These components provide hydration while regulating oil production and soothing inflammation. Using the right moisturizer ensures your skin remains balanced, reducing excess shine and breakouts over time.


    11 – Over-Using a Purple Shampoo

    Purple shampoo is a go-to product for blondes looking to neutralize brassy tones, but using it too often can lead to unintended consequences. Overuse can result in dry, brittle hair or even leave a purple tint behind. Celebrity hairstylist Kristin Ess advises, “Purple shampoo should be used strategically—too much can make your hair look dull or even slightly violet.”

    To maintain a bright, healthy blonde, limit purple shampoo use to once or twice a week. On other days, use a hydrating, color-safe shampoo to keep hair nourished and prevent excessive dryness. If brassiness persists, consider a salon-grade toner or gloss treatment to refresh your color without overloading your strands with pigment.


    12 – Applying Makeup Without Prepping Your Skin

    Applying makeup to unprepped skin can lead to an uneven application, cakiness, or patchiness throughout the day. Skipping essential skincare steps, such as cleansing, moisturizing, and priming, can cause foundation and concealer to settle into fine lines and dry patches. Renowned makeup artist Charlotte Tilbury emphasizes, “Flawless makeup starts with great skincare—prepping the skin ensures a smooth, radiant finish.”

    To create the perfect canvas, start with a clean face, followed by a lightweight moisturizer that suits your skin type. Apply a primer to address specific concerns, such as oil control, hydration, or pore filling. Proper skin preparation enhances makeup longevity and ensures a more polished, professional-looking result.


    13 – Getting Pricey Hair Extensions

    High-quality hair extensions can be a great way to add volume and length, but investing in expensive ones without proper maintenance can be a waste of money. Many people assume that once extensions are installed, they require little upkeep, but neglecting care can lead to tangling, breakage, and an unnatural appearance. Hair expert Jen Atkin notes, “Even the best extensions will look bad if they’re not properly maintained—regular conditioning and gentle handling are key.”

    Instead of splurging on costly extensions, consider clip-ins or tape-ins that are easier to maintain. Always use sulfate-free shampoos, detangle gently with a wide-tooth comb, and avoid excessive heat styling. Proper care ensures your extensions blend seamlessly with your natural hair and last longer, making them a worthwhile investment.


    14 – Picking at Your Pimples

    Popping pimples may offer temporary satisfaction, but it often leads to long-term damage such as scarring, hyperpigmentation, and even infections. Squeezing blemishes pushes bacteria deeper into the skin, increasing inflammation and delaying the healing process. Dermatologist Dr. Sandra Lee, better known as Dr. Pimple Popper, warns, “Picking at a pimple is like playing with fire—you’re almost guaranteed to make it worse.”

    Instead of squeezing blemishes, use a spot treatment with benzoyl peroxide, salicylic acid, or tea tree oil to reduce inflammation and speed up healing. Hydrocolloid patches are also an effective way to protect the pimple while drawing out impurities. Practicing patience and proper skincare will prevent unnecessary skin damage.


    15 – Laying Out in the Sun to Tan

    Sunbathing for a golden tan may seem appealing, but prolonged sun exposure significantly increases the risk of premature aging and skin cancer. UV rays break down collagen and elastin, leading to wrinkles, sunspots, and loss of skin elasticity. The American Academy of Dermatology warns, “There’s no such thing as a safe tan—every exposure to UV rays contributes to skin damage.”

    Instead of tanning under the sun, opt for self-tanners or spray tans to achieve a sun-kissed glow without the harmful effects. If you’re spending time outdoors, always wear broad-spectrum SPF 30 or higher, seek shade, and use protective clothing. Keeping your skin safe from UV damage is one of the best ways to maintain a youthful appearance.

    16 – Using the Same Face Towel All Week

    Reusing the same face towel for days may seem harmless, but it can lead to a buildup of bacteria, dirt, and dead skin cells. Each time you dry your face, you’re potentially reintroducing impurities that can clog pores and trigger breakouts. Dermatologist Dr. Mona Gohara explains, “A damp towel is a breeding ground for bacteria, which can exacerbate acne and skin irritation.”

    To maintain clear, healthy skin, switch to a clean towel every couple of days. Consider using soft, microfiber cloths that are gentle on the skin and dry quickly. For an even more hygienic approach, let your face air dry or use disposable facial tissues to pat dry, reducing bacterial contamination.


    17 – Reserving Lip Balm for Daytime Use Only

    Many people apply lip balm only during the day, neglecting their lips at night. However, lips lose moisture while you sleep, leading to dryness and cracking. Skincare expert Dr. Debra Jaliman states, “Your lips don’t have oil glands, so they need extra hydration overnight to stay smooth and healthy.”

    To keep your lips soft, apply a nourishing lip mask or balm before bed. Look for formulas containing shea butter, ceramides, or hyaluronic acid for deep hydration. Regular nighttime application will ensure your lips remain plump and protected, even in harsh weather conditions.


    18 – Sleeping on a Cotton Pillowcase

    Cotton pillowcases absorb oils, bacteria, and product residue, which can lead to skin irritation and hair frizz. The friction from cotton fabric can also contribute to premature wrinkles and moisture loss. Skincare expert Dr. Howard Sobel explains, “Sleeping on a cotton pillowcase can create creases on the skin that, over time, turn into permanent wrinkles.”

    Switching to a silk or satin pillowcase can reduce friction, prevent hair breakage, and help retain skin moisture. Silk’s smooth texture allows your skin to glide effortlessly, reducing the risk of fine lines. This small change in your sleep routine can make a big difference in the overall health of your skin and hair.


    19 – Attempting to Treat Body Acne With a Traditional Scrub

    Many people assume that using a physical scrub will help clear body acne, but aggressive exfoliation can worsen irritation and inflammation. Scrubbing can cause microtears in the skin, spreading bacteria and making breakouts more severe. Dermatologist Dr. Angela Lamb advises, “Instead of scrubbing, use a chemical exfoliant like salicylic acid or benzoyl peroxide to treat body acne effectively.”

    For best results, opt for a body wash with acne-fighting ingredients like glycolic acid or tea tree oil. Follow up with a lightweight, non-comedogenic moisturizer to keep your skin balanced. Gentle, consistent care is the key to treating body acne without causing further damage.


    20 – Wasting Money on Expensive Acne Treatments

    Expensive acne products may promise miraculous results, but price doesn’t always equate to effectiveness. Many high-end treatments contain the same active ingredients as affordable alternatives. Skincare expert Dr. Sandra Lee notes, “It’s not about the brand or price—it’s about the ingredients that actually work.”

    Instead of splurging on luxury products, look for dermatologist-recommended ingredients like salicylic acid, benzoyl peroxide, and retinoids. Over-the-counter treatments from reputable brands can be just as effective as high-end options. Investing in a solid skincare routine rather than overpriced products will yield better long-term results.


    21 – Not Taking Care of Your Cuticles

    Ignoring cuticle care can lead to dryness, hangnails, and infections. Many people pick at their cuticles or neglect them entirely, weakening the nail bed. Celebrity nail artist Deborah Lippmann explains, “Your cuticles protect your nails from bacteria—trimming them too much or leaving them dry can cause long-term damage.”

    To keep cuticles healthy, apply cuticle oil daily and gently push them back instead of cutting them. Using a hydrating hand cream can also prevent peeling and cracking. Proper cuticle care not only keeps nails looking polished but also supports their overall strength and growth.


    22 – Tying Your Hair Back With a Tight Elastic

    Constantly pulling your hair back into a tight ponytail or bun can lead to breakage and traction alopecia—a form of hair loss caused by prolonged tension on the scalp. Trichologist Anabel Kingsley warns, “Repeatedly wearing tight hairstyles weakens hair follicles and can result in permanent hair thinning.”

    Opt for silk scrunchies or spiral hair ties, which are gentler on the hair. Switching up your hairstyle and avoiding excessive tension will protect your strands from unnecessary damage. If you must wear your hair up, keep it loose and alternate styles to reduce stress on the scalp.


    23 – Forgetting to Apply Sunscreen to Your Lips

    Many people apply sunscreen to their face but forget their lips, leaving them vulnerable to sunburn and premature aging. The delicate skin on the lips lacks melanin, making it more susceptible to UV damage. Dermatologist Dr. Elizabeth Hale states, “Lip cancer is more common than people realize—using SPF lip balm daily is a simple yet essential step.”

    To protect your lips, use a lip balm with SPF 30 or higher and reapply throughout the day. Look for formulas with nourishing ingredients like shea butter and antioxidants to provide extra hydration and protection. Keeping your lips shielded from the sun will prevent discoloration, dryness, and long-term damage.


    24 – Washing Your Hair With Hard Water

    Hard water contains minerals like calcium and magnesium, which can build up on the scalp and hair, leading to dryness, dullness, and breakage. Over time, these minerals create a film that prevents moisture from penetrating the hair shaft. Celebrity hairstylist Kristin Ess explains, “Hard water can strip hair color and leave it looking lifeless—using a water filter or clarifying shampoo helps remove buildup.”

    If you live in an area with hard water, invest in a shower filter to reduce mineral deposits. Using a clarifying shampoo once a week and following up with a deep conditioner can help restore hydration and shine. Regular maintenance will keep your hair looking vibrant and healthy despite the effects of hard water.


    25 – Not Protecting Your Hair When You Use Hot Tools

    Frequent heat styling without protection can cause severe hair damage, leading to split ends and weakened strands. Heat tools strip moisture from the hair, making it more prone to breakage. Hairstylist Jen Atkin emphasizes, “Using heat without protection is like sunbathing without sunscreen—it’s a guaranteed way to damage your hair.”

    Before using any hot tools, always apply a heat protectant spray or serum. Opt for lower heat settings and avoid excessive use of straighteners and curling irons. Incorporating heat-free styling techniques, like braids or rollers, can help preserve your hair’s health while still achieving beautiful styles.

    26 – Using Cotton Rounds to Apply Toner

    Cotton rounds may seem like a convenient way to apply toner, but they absorb too much product, leading to unnecessary waste. Additionally, the rough texture can irritate sensitive skin, especially when applying active ingredients like glycolic acid or salicylic acid. Skincare expert Dr. Shereene Idriss advises, “Switching to hands or reusable applicators ensures your skin gets the full benefit of your toner without unnecessary friction.”

    Instead of cotton rounds, try patting toner directly onto your skin with clean hands or using a reusable, soft microfiber pad. This method enhances absorption and ensures you’re not wasting valuable skincare products. Plus, it’s a more eco-friendly approach that reduces disposable waste.


    27 – Not Cleaning Your Makeup Brushes Enough

    Dirty makeup brushes harbor bacteria, oil, and old product buildup, which can lead to breakouts and skin infections. Many people go weeks or even months without washing their brushes, unknowingly exposing their skin to harmful microbes. Dermatologist Dr. Ava Shamban warns, “Unwashed brushes can contribute to acne, irritation, and even eye infections if not cleaned regularly.”

    To keep your brushes hygienic, wash them at least once a week using a gentle brush cleanser or mild shampoo. Rinse thoroughly and let them air dry on a clean towel. Regular cleaning not only protects your skin but also extends the lifespan of your brushes, ensuring flawless makeup application.


    28 – Not Cleaning Your Facial Ice Roller

    Facial ice rollers are great for reducing puffiness and soothing inflammation, but they can quickly become a breeding ground for bacteria if not cleaned properly. Many people store their rollers in the freezer without washing them after each use, increasing the risk of transferring germs onto their skin. Dr. Whitney Bowe emphasizes, “Any skincare tool that touches your face should be cleaned regularly to prevent bacterial buildup.”

    To maintain hygiene, clean your ice roller after every use with a gentle soap or disinfectant wipe. Store it in a clean container or zip-lock bag in the freezer to avoid contamination. Keeping your tools clean ensures they remain effective and safe for daily use.


    29 – Steaming Acne-Prone Skin

    While facial steaming can feel relaxing, it’s not always beneficial for acne-prone skin. The heat can dilate blood vessels and increase inflammation, making breakouts worse rather than better. Dermatologist Dr. Ranella Hirsch explains, “Steaming can actually exacerbate acne by increasing redness and swelling, especially for those with sensitive skin.”

    Instead of steaming, opt for gentle exfoliation with chemical exfoliants like AHAs or BHAs to unclog pores. If you enjoy steaming, limit it to once a week and follow with a soothing mask to minimize irritation. Moderation is key to preventing unnecessary skin flare-ups.


    30 – Dermaplaning With a Mini Razor

    Dermaplaning removes peach fuzz and dead skin cells, but using a mini razor at home without proper technique can lead to nicks, irritation, and even infections. Many people use dull blades or apply too much pressure, damaging their skin barrier. Aesthetician Kerry Benjamin warns, “DIY dermaplaning can be risky if not done correctly—professional treatments are safer and more effective.”

    If you choose to dermaplane at home, use a sterilized, single-use razor and glide it gently at a 45-degree angle. Follow up with a hydrating serum to soothe the skin. However, for the best results, consider getting professional dermaplaning treatments that ensure safety and effectiveness.


    31 – Washing Your Hair Too Often

    Daily hair washing may seem like a good hygiene practice, but over-washing strips the scalp of its natural oils, leading to dryness and increased oil production. This cycle can cause hair to become brittle or excessively greasy. Hair expert Philip Kingsley explains, “Washing too frequently disrupts the scalp’s natural balance, making it harder to maintain healthy hair.”

    Try washing your hair every two to three days, or even less if you have dry or curly hair. Use dry shampoo between washes to absorb excess oil and refresh your scalp. Finding the right balance will keep your hair nourished while preventing unnecessary damage.


    32 – Applying a Shimmery Highlighter to Your Skin

    Shimmery highlighter can add a radiant glow, but overuse or incorrect placement can emphasize fine lines, texture, and pores. Many people apply too much product, making their skin look oily rather than luminous. Celebrity makeup artist Bobbi Brown advises, “A little highlighter goes a long way—strategic placement is key to achieving a natural glow.”

    For a flattering look, apply a light dusting of highlighter to the high points of your face, such as the cheekbones and brow bones. Choose a finely milled formula that blends seamlessly into the skin. Avoid glittery or chunky formulas that can appear unnatural under different lighting conditions.


    33 – Using Powder to Touch Up Oily Skin

    Reapplying powder throughout the day may seem like a quick fix for oily skin, but it can lead to a cakey, heavy finish. Layering powder on top of oil buildup can also clog pores and cause breakouts. Skincare expert Dr. Dennis Gross recommends, “Instead of piling on powder, use blotting papers to absorb excess oil without disrupting your makeup.”

    If you need to refresh your makeup, opt for a mattifying setting spray or a light dusting of translucent powder. Applying powder only to specific areas, like the T-zone, will help control shine without overloading the skin with product.


    34 – Relying on Poor Lighting While Doing Your Makeup

    Applying makeup in dim or artificial lighting can lead to mismatched foundation, unblended contour, or overly heavy application. Many people don’t realize how different their makeup looks in natural light until they step outside. Makeup artist Lisa Eldridge emphasizes, “Good lighting is essential for achieving a seamless, natural-looking makeup application.”

    To avoid makeup mishaps, apply your makeup near a window with plenty of natural light. If that’s not possible, invest in a well-lit vanity mirror with adjustable LED settings. Proper lighting ensures your makeup looks flawless in all settings.


    35 – Layering on Self-Tanner Without Exfoliating First

    Skipping exfoliation before applying self-tanner can result in an uneven, streaky application. Dead skin cells cause the tanner to cling to dry patches, creating dark spots and an unnatural finish. Tanning expert Jules Von Hep explains, “Exfoliating beforehand ensures an even canvas, allowing the tan to develop smoothly.”

    Before self-tanning, use a gentle body scrub or exfoliating mitt to slough off dead skin. Focus on rough areas like elbows, knees, and ankles. Applying a lightweight moisturizer beforehand can also help prevent patchiness, leading to a more natural-looking tan.


    36 – Always Buying Full-Size Mascaras

    Mascara has a short shelf life, and using an old tube can lead to eye infections or irritation. Many people invest in full-size mascaras only to have them dry out before they’re fully used. Ophthalmologist Dr. Diane Hilal-Campo warns, “Mascara should be replaced every three months to prevent bacterial buildup that can cause eye issues.”

    Instead of buying full-size mascaras, consider purchasing travel-size versions. These are more affordable, allow you to try different formulas, and reduce product waste. Regularly replacing mascara ensures a fresh, clump-free application while keeping your eyes safe.

    37 – Loading Your Hair Up With Product to Add Volume

    Applying too much volumizing product can weigh hair down rather than lift it. Many people mistakenly think that more mousse, spray, or dry shampoo will create lasting volume, but overuse can lead to buildup, making hair feel greasy and lifeless. Hairstylist Jen Atkin advises, “Less is more when it comes to volumizing products—layering lightly creates movement without stiffness.”

    For best results, start with a small amount of product and focus on the roots. Blow-drying with a round brush or using velcro rollers can also boost volume without excessive product use. Regular clarifying treatments help remove buildup, keeping your hair bouncy and fresh.


    38 – Faking Fuller Lips With a Capsaicin-Infused Gloss

    Capsaicin, the active ingredient in chili peppers, is often found in plumping lip glosses to create a temporary swelling effect. However, these formulas can cause irritation, redness, and long-term dryness. Dermatologist Dr. Whitney Bowe warns, “Frequent use of capsaicin-based plumpers can lead to lip sensitivity and dehydration over time.”

    For a safer, more natural approach, try exfoliating your lips to enhance their fullness or use hydrating lip masks. Opt for peptides or hyaluronic acid-infused lip treatments that provide a plumping effect without irritation. Overlining with a lip liner can also create the illusion of fuller lips without discomfort.


    39 – Using Dry Shampoo That Quite Literally Dries Your Hair Out

    Dry shampoo is a lifesaver on busy days, but excessive use can strip the scalp of natural oils and cause buildup. Many aerosol formulas contain alcohol, which can dry out both the scalp and hair, leading to breakage. Trichologist Bridgette Hill explains, “Overuse of dry shampoo can clog hair follicles, causing scalp issues and dull strands.”

    To prevent damage, limit dry shampoo use to once or twice a week. Opt for formulas with nourishing ingredients like rice starch or oat milk, which absorb oil without dehydrating the scalp. Regularly washing your hair and massaging the scalp ensures a healthy balance of natural oils.


    40 – Only Flossing When You See Food Between Your Teeth

    Flossing isn’t just about removing visible food particles—it’s essential for gum health and preventing cavities. Skipping daily flossing allows plaque buildup, which can lead to gum disease and bad breath. Dr. Mark Burhenne, author of The 8-Hour Sleep Paradox, states, “The bacteria trapped between your teeth don’t just affect your mouth—they contribute to systemic inflammation in the body.”

    Make flossing a daily habit, even if you don’t see food stuck between your teeth. Water flossers or interdental brushes are great alternatives for those who find traditional floss difficult to use. Consistent oral care leads to healthier gums and a fresher smile.


    41 – Applying Lipstick on Dry, Flaky Lips

    Lipstick on chapped lips can accentuate dryness and create an uneven texture. Many people skip proper lip prep, leading to a patchy or cracked lipstick finish. Makeup artist Charlotte Tilbury emphasizes, “A well-prepped lip is the secret to a flawless lipstick application.”

    Before applying lipstick, exfoliate your lips with a gentle scrub or a soft toothbrush. Follow up with a hydrating lip balm and let it absorb before applying color. Choosing creamy or hydrating lipstick formulas prevents further dryness and keeps lips looking smooth.


    42 – Going to Bed Without Removing All Your Eye Makeup

    Leaving eye makeup on overnight can clog lash follicles, leading to irritation, infections, and even lash loss. Mascara and eyeliner residue can also contribute to under-eye puffiness and dark circles. Ophthalmologist Dr. Rupa Wong warns, “Sleeping in eye makeup increases the risk of developing styes and conjunctivitis.”

    Use a gentle, oil-based remover to dissolve stubborn eye makeup without rubbing. Double cleansing ensures every trace is removed while keeping the delicate eye area hydrated. Proper makeup removal prevents premature aging and keeps your lashes and eyes healthy.


    43 – Letting Pricey Skin Care Products Go to Waste

    Many people invest in expensive skincare but fail to store or use them correctly, leading to wasted product and reduced effectiveness. Exposure to heat, air, and sunlight can degrade active ingredients, making them less potent. Dermatologist Dr. Loretta Ciraldo advises, “Proper storage extends the life of skincare products—keeping them in a cool, dark place ensures maximum efficacy.”

    To avoid waste, use products consistently and within their recommended shelf life. Opt for airtight containers and store sensitive formulas, like vitamin C serums and retinoids, away from direct sunlight. Being mindful of skincare storage preserves its benefits and saves money in the long run.


    44 – Tolerating Dry, Cracked Heels

    Ignoring dry heels can lead to painful cracks, infections, and discomfort when walking. Many people rely on occasional moisturizing, which isn’t enough to repair severe dryness. Podiatrist Dr. Miguel Cunha explains, “Regular exfoliation and deep hydration are key to preventing cracked heels.”

    To keep heels soft, use a foot scrub or pumice stone weekly and apply a thick, emollient-rich moisturizer before bed. Wearing moisture-locking socks overnight enhances absorption, ensuring lasting hydration. Consistent care prevents painful cracks and keeps feet looking and feeling smooth.


    45 – Using a Giant Cotton Bath Towel to Dry Your Hair

    Regular bath towels create friction that can cause frizz, breakage, and moisture loss in the hair. Cotton fibers are rough on delicate strands, especially when aggressively rubbing the hair dry. Hairstylist Kristin Ess states, “Switching to a microfiber towel or a cotton T-shirt reduces friction and keeps hair smooth.”

    Instead of rubbing your hair, gently squeeze out excess water with a microfiber towel. Letting hair air dry partially before using heat tools also minimizes damage. A small change in your drying routine can improve hair health and texture over time.


    46 – Always Getting Gel Manicures

    Gel manicures provide long-lasting shine but can weaken nails over time due to the repeated use of harsh chemicals and UV exposure. Frequent gel removal can cause nail thinning and brittleness. Dr. Dana Stern, a nail health expert, warns, “Overuse of gel polish can lead to dehydration and long-term damage to the nail plate.”

    To maintain nail health, take breaks between gel manicures and apply strengthening treatments. Using cuticle oil daily and opting for regular polish occasionally helps prevent excessive nail weakening. Prioritizing nail care ensures both beauty and strength in the long run.


    47 – Using the Wrong Makeup Brush

    Applying makeup with the wrong brush can result in uneven blending, streaky foundation, or patchy eyeshadow. Different brushes serve specific purposes, and using the incorrect one can make application harder than it needs to be. Makeup artist Wayne Goss emphasizes, “Investing in the right tools makes a huge difference in how makeup sits on the skin.”

    Choose high-quality, well-shaped brushes that match the product you’re using—fluffy brushes for blending powders, dense brushes for foundation, and angled brushes for precision work. Keeping brushes clean also ensures smoother application and prevents breakouts.


    48 – Thinking That Brushing & Mouthwash Will Stop Bad Breath

    Brushing and using mouthwash alone don’t always eliminate bad breath, especially if the root cause is bacteria on the tongue or digestive issues. Many people neglect tongue cleaning, which allows odor-causing bacteria to thrive. Dentist Dr. Richard Price states, “The tongue harbors more bacteria than any other part of the mouth—scraping it daily is essential for fresh breath.”

    Use a tongue scraper or the back of your toothbrush to remove buildup each morning. Staying hydrated and consuming fiber-rich foods can also help balance oral bacteria. Comprehensive oral hygiene ensures long-lasting freshness beyond just brushing and rinsing.


    49 – Using Mouthwash That Contains Alcohol

    Alcohol-based mouthwashes can dry out the mouth, leading to bad breath and irritation rather than true oral health benefits. They kill both harmful and beneficial bacteria, disrupting the mouth’s natural balance. Dr. Mark Wolff, a dental expert, explains, “Non-alcoholic mouthwashes are just as effective at killing bacteria without causing dryness.”

    Opt for mouthwashes with fluoride, xylitol, or essential oils to support oral health without harsh effects. Hydration and saliva production naturally combat bacteria, so drinking plenty of water is also crucial for maintaining fresh breath.


    50 – Relying on a Regular Manual Toothbrush

    While manual toothbrushes can effectively clean teeth, they often don’t remove plaque as efficiently as electric ones. Studies show that electric toothbrushes reduce plaque buildup and gum disease more effectively. The American Dental Association states, “Powered toothbrushes with oscillating bristles provide superior cleaning and are especially beneficial for those with dexterity issues.”

    Switching to an electric toothbrush ensures a deeper clean with minimal effort. Look for models with timers and pressure sensors to improve your brushing technique and maintain optimal oral health.


    Conclusion

    Beauty mistakes can be subtle, yet their effects accumulate over time, leading to unnecessary damage to your skin, hair, and overall health. By making small adjustments to your routine—whether it’s switching to a silk pillowcase, using a gentler exfoliant, or applying SPF to often-forgotten areas—you can maintain long-term beauty and wellness. As beauty expert Caroline Hirons puts it, “Good skincare isn’t about trends—it’s about consistency and knowledge.”

    Prioritizing expert-backed habits will ensure you look and feel your best for years to come.

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Age of Jihad Islamic State and The Great War for the Middle East

    Age of Jihad Islamic State and The Great War for the Middle East

    Patrick Cockburn’s The Age of Jihad examines the tumultuous state of the Middle East following the collapse of the Ottoman Empire. The book focuses on the destabilizing impact of the 2003 US invasion of Iraq, arguing that it exacerbated existing sectarian tensions and created a power vacuum exploited by various groups. Cockburn traces the evolution of conflicts in Iraq, Syria, Libya, and Afghanistan, highlighting the role of foreign intervention, sectarian violence, and the rise of militant Islamism. He analyzes the human cost of these wars, depicting the suffering of civilians caught in the crossfire and the lasting consequences of political instability and violence. The book concludes by considering the long-term implications of these conflicts on the region and the world.

    The Age of Jihad: A Study Guide

    Short Answer Quiz

    1. According to the author, what is at the heart of the book’s analysis of the Middle East and why?
    2. What is significant about the 1975 Algiers Agreement involving Saddam Hussein?
    3. How did the sanctions imposed on Iraq after the Gulf War affect its population?
    4. What did the author observe about the distribution of power in Afghanistan?
    5. How did the author describe the state of the Iraqi Army’s command structure along sectarian lines?
    6. What was the significance of al-Mutanabbi Street in Baghdad, and what did it symbolize about Iraqi society after sanctions?
    7. What is the meaning of the term “hawasimi” in the context of post-invasion Iraq?
    8. How did the author characterize the methods used by guerrillas in Iraq against U.S. forces?
    9. What specific details does the author use to illustrate the difficulties of life in Mosul under ISIS?
    10. What is “Somalianisation” and why is it described as an ominous trend?

    Quiz Answer Key

    1. The invasion and occupation of Iraq by the U.S. is central because it destroyed Iraq as a united country, leading to a state of permanent conflict among its three main communities (Shia, Sunni, and Kurds) which has had a destabilizing effect on the entire region.
    2. The 1975 Algiers Agreement temporarily ended the Kurdish rebellion, as Saddam Hussein made a deal with the Shah of Iran, who, with U.S. backing, betrayed his former Kurdish allies.
    3. Sanctions caused immense suffering and unnecessary hardship to ordinary Iraqis, without causing the demise of Saddam Hussein’s rule. They led to severe shortages of essential goods, limited access to healthcare, and a decline in the standard of living.
    4. Power in Afghanistan is highly fragmented, with villages acting like independent republics. The author highlights that a foreign peacekeeping force must maintain strict neutrality to be successful.
    5. The Iraqi Army was deeply sectarian, with Shia soldiers never meeting Sunni private soldiers, and Shia soldiers not reaching the rank of officer. This highlights the existing social stratification within Iraq’s military.
    6. Al-Mutanabbi Street was the center of the book trade in Baghdad, and it displayed how the educated class sold off their personal libraries due to the economic hardships caused by sanctions. The books’ underlined and translated words reveal an attempt to connect with English literature.
    7. “Hawasimi,” meaning “finalists,” is a sarcastic reference to those who have gained from the collapse and occupation of Iraq. The term is often applied to new police recruits, and it points to the distrust and opportunism present during this era.
    8. Guerrillas used roadside bombs, which were difficult to detect because they were often camouflaged within garbage and detonate with command wires, car door openers, or mobile phones. They also created booby traps specifically designed to target bomb-defusing sappers.
    9. Mosul under ISIS is described as a city experiencing severe shortages of food, fuel, water, and electricity. Living conditions were likened to the “Stone Age,” with no mobiles, TV, cars, or consistent lighting. Public punishments were also common.
    10. “Somalianisation” refers to a permanent state of chaos and warfare stemming from a failed state. This term is used to describe the trends of destabilization and rebellion across various countries in the Middle East from 2001 onward.

    Essay Questions

    1. Analyze the role of external actors, particularly the United States and its allies, in the destabilization of Iraq and Afghanistan, according to Cockburn’s analysis.
    2. Discuss the factors contributing to the rise of sectarian conflict in the Middle East, as presented in Cockburn’s work, and assess the impact of these conflicts on the populations of affected countries.
    3. How does Cockburn characterize the leadership of Saddam Hussein, and what does his trajectory reveal about the nature of power in the Middle East?
    4. Evaluate the effectiveness and unintended consequences of sanctions, as described in the book, using specific examples from the author’s observations in Iraq.
    5. Explore the significance of the concept of a caliphate and its implications for the Middle East and beyond, according to the text’s perspective on the rise of ISIS.

    Glossary of Key Terms

    • Algiers Agreement: A 1975 agreement between Iraq and Iran that temporarily ended the Kurdish rebellion, where Saddam Hussein made a deal with the Shah of Iran, who, with U.S. backing, betrayed his former Kurdish allies.
    • Baath Party: A political party that held power in Iraq under Saddam Hussein, noted for its nationalist ideology and authoritarian rule.
    • Caliphate: An Islamic state led by a religious and political successor to the prophet Muhammad, historically embodying religious and political unity.
    • Fedayeen: Fighters loyal to the former Baathist regime of Saddam Hussein.
    • Green Zone: A heavily fortified and secured area in Baghdad, housing the Iraqi government and international embassies, symbolizing the divide between the occupation forces and Iraqi society.
    • Guerrilla Warfare: Unconventional warfare using tactics such as ambushes and sabotage, employed by non-state actors, including insurgents and rebels.
    • Hawasimi: An Iraqi term for those who have profited from the chaos and occupation, highlighting the corruption and opportunism of post-invasion Iraq.
    • Jihad: A religious duty of Muslims; can refer to the inner struggle to follow Islam or an external struggle to defend Islam.
    • Kafir: An Arabic term meaning “disbeliever,” often used by extremist groups to label those considered non-believers of Islam.
    • Kurdish Peshmerga: The military forces of the autonomous Kurdistan region, known for their effectiveness in fighting against ISIS.
    • Mehdi Army: A Shia militia group in Iraq loyal to Muqtada al-Sadr, known for its involvement in sectarian violence and resistance against the U.S.-led occupation.
    • Sanctions: Economic penalties or restrictions imposed on a country, in this case used by the United Nations against Iraq, impacting daily life and infrastructure.
    • Sectarianism: Divisions and conflicts based on religious or ethnic affiliations, most prominent in the Middle East among Sunni, Shia, and Kurdish populations.
    • Sharia: Islamic law derived from the Quran and the teachings of the prophet Muhammad, used as the legal and moral code by some groups, such as ISIS.
    • Somalianisation: A term used to describe a state of permanent chaos and warfare resulting from a failed state, applicable to various unstable countries in the Middle East and Africa.
    • Sunni Triangle: A region in Iraq primarily inhabited by Sunni Arabs, often associated with resistance against the U.S. occupation and the Shia-dominated government.
    • Sykes-Picot Agreement: A secret 1916 agreement between Britain and France dividing up the Middle East after the collapse of the Ottoman Empire, leading to many borders and conflicts in the region.
    • Taliban: A fundamentalist Islamic political and military organization that ruled Afghanistan and is known for its extremist ideology and strict enforcement of religious laws.
    • Valmara: Italian-made antipersonnel landmines, which were widely dispersed in Iraq and caused many casualties.
    • Wahhabism: A puritanical, fundamentalist movement within Sunni Islam originating in Saudi Arabia, often associated with intolerance and extremism.

    Middle East and Afghanistan Conflicts: 2001-2015

    Briefing Document: Key Insights from the Sources

    This briefing document consolidates key information from the provided sources, focusing on the conflicts and political situations in the Middle East and Afghanistan from 2001 to 2015.

    1. The Complexities of War Reporting and Analysis

    • Challenges of Generalization: The sources caution against oversimplifying complex historical situations, emphasizing the danger of drawing parallels without full command of details [1]. This highlights the need for nuanced analysis rather than broad generalizations.
    • Journalistic Limitations: War reporters face criticism from two extremes: being seen as “hotel journalists” or “war junkies” [2]. There’s also a tension between the need to cover actual fighting and the need to explain the underlying causes of the conflict. Journalists in the field are often contradicted by pundits and “talking heads” in their home offices, who may not have direct experience [3].
    • Eyewitness Credibility: The “first draft of history” provided by journalists can be more credible than later interpretations, as it has not been “through the blender of received wisdom and academic interpretation” [3].

    2. Afghanistan: The Taliban, Northern Alliance, and US Intervention

    • Taliban’s Resurgence: The Taliban were not truly defeated initially, allowing them to make a significant comeback [2]. The initial reporting on the war may have missed this crucial long-term implication.
    • Northern Alliance: The Northern Alliance, an Afghan opposition group, was initially isolated but gained importance after 9/11 when the US needed allies on the ground [4, 5]. The Northern Alliance controlled areas like the Panjshir valley [4].
    • US reliance on allies: The US needed anti-Taliban allies on the ground in Afghanistan, and the first to move was General Dostum [5].
    • Journalist Access: Journalists faced difficulties entering Afghanistan [6]. Some were able to gain access through the Northern Alliance, using an old Russian helicopter [6].

    3. Iraq: Sanctions, the US Invasion, and the Rise of Insurgency

    • Impact of Sanctions: UN sanctions imposed on Iraq in 1990 led to devastating consequences for the Iraqi people, including shortages of medicine and supplies [7, 8].
    • Misguided Expectations: Some Iraqi expatriates gave the US false information before the invasion, including the expectation that US forces would be greeted with flowers and sweets [9].
    • US Misunderstandings: US military and civil leaders often misunderstood Iraqi culture and politics [10, 11]. Some US commanders seemed to get their ideas about the Arab world from Hollywood [10].
    • Insurgency and IEDs: Insurgents became increasingly confident, using improvised explosive devices (IEDs). US soldiers were not prepared for this type of warfare, having been trained for conventional warfare [12].
    • Propaganda and Zarqawi: The US exaggerated the role of Abu Musab al-Zarqawi to explain the insurgency, though many Iraqis questioned if he even existed [13, 14]. This propaganda may have led the US to underestimate the broader Sunni resistance to the occupation [14].
    • Civilian Casualties: US air power led to civilian casualties, increasing support for the insurgents [15].
    • Loss of Control: The US struggled to control the provinces, with insurgents controlling Baquba [16]. There was also a lack of coordination and information sharing between different US commanders and offices [10, 17].
    • Violence and Sectarianism: The conflict in Iraq intensified existing sectarian divisions between Shia and Sunni populations [18, 19].

    4. Libya: The Fall of Gaddafi and Post-Conflict Chaos

    • Rebel Infighting: The rebels fighting against Gaddafi were a mix of militias, some of whom were prone to paranoia [20]. There was also a lack of confidence in the new military leadership that was supported by Western powers [20].
    • NATO bombing: There were cases of “friendly fire” by NATO forces, which caused anger among the rebels [21].
    • Treatment of Black Africans: Libyan rebels were hostile to black Africans, and many were arrested because of their skin color [22].
    • Torture and Human Rights Abuses: Both pro and anti-Gaddafi forces used torture [23, 24]. There was a lack of transparency regarding these human rights abuses and the UK was criticized for their involvement [25].

    5. Other Conflicts and Human Rights Issues

    • Yemen: The US and Britain supported an unpopular and corrupt government in Yemen, which allowed al-Qaeda to gain strength [26].
    • Bahrain: Security forces were accused of torturing protesters and dissidents [27, 28]. The government also punished people for expressing sympathy for the protesters [29].

    6. Rise of ISIS

    • Early Warnings: In 2014, the author noted that ISIS’s growing strength in Iraq was the most important development in the region, though this observation was not widely shared by Syrian experts [1, 30].
    • ISIS tactics: ISIS launched diversionary attacks with small groups before striking suddenly at a single target [30].
    • Hashid Shaabi Weaknesses: The Shia militia, the Hashid Shaabi, was enthusiastic but poorly trained [31].

    7. Saudi Arabia and the Sunni-Shia Divide

    • Dual Policy: Saudi Arabia encouraged anti-Shia militancy abroad, but suppressed these groups at home [32].
    • Financial Support for Terror Groups: Saudi Arabia has been a critical financial support base for al-Qaeda, the Taliban, and other terrorist groups [32].
    • Proxy War: Saudi Arabia, Turkey, and the UAE promoted a proxy Sunni-Shia war in Syria, supporting extremist groups like al-Nusra and al-Qaeda [33].

    8. The Impact of US Policies

    • Lack of Control: The US failed to impose its control in both Iraq and Afghanistan, leaving behind very different political and military landscapes [34].
    • Unintended Consequences: The US’s actions in the region had numerous unintended consequences, including strengthening groups they opposed [26, 34].

    This briefing document highlights the complex and often contradictory nature of the conflicts discussed in the provided sources. The document also emphasizes the significance of understanding the local contexts, cultural sensitivities, and the long-term implications of interventionist policies.

    Middle East & Afghanistan Conflicts: 2001-2015

    Frequently Asked Questions (FAQ) Based on the Sources

    This FAQ addresses common questions arising from the provided sources regarding the conflicts and political situations in the Middle East and Afghanistan between 2001 and 2015.

    1. What were the main challenges faced by journalists covering these conflicts?

    • Journalists often faced a credibility gap, with those in the field sometimes contradicted by pundits and “talking heads” who lacked direct experience [1].
    • There was a tension between the need to cover the fighting and explaining the root causes of the conflicts [1].
    • Access to conflict zones was often difficult [2]. In Afghanistan, journalists had to use unconventional methods to get into the country, such as an old Russian helicopter [2].
    • Some journalists were criticized for being either “hotel journalists” or “war junkies,” highlighting the challenges of maintaining objectivity and focus in a conflict zone [1].

    2. How did the Taliban regain power in Afghanistan after their initial defeat?

    • The Taliban were not completely defeated initially, allowing them to regroup and make a significant comeback [1].
    • The US underestimated the Taliban’s long-term resilience [1].
    • The Taliban was able to exploit the existing political and social landscape [3].
    • The Afghan opposition felt abandoned and alone [4].

    3. What were the consequences of the UN sanctions on Iraq?

    • The sanctions led to severe shortages of food, medicine, and other essential supplies [5, 6].
    • Ordinary Iraqis suffered greatly, with many falling ill or dying due to lack of medical care [5].
    • The “oil-for-food” program, intended to alleviate the crisis, failed to make a measurable difference [6].

    4. Why did the US invasion of Iraq face so much resistance?

    • The US had misguided expectations and were given false information by some Iraqi expatriates who predicted that US forces would be welcomed with flowers and sweets [7].
    • The US military and Paul Bremer provoked confrontations with both the Shia and Sunni Arabs, who made up 80% of the population [8].
    • The US occupation forces were seen as an unwelcome foreign presence [9].
    • The US dissolved the Iraqi army which resulted in many unemployed soldiers who were willing to fight [10].
    • The US military was not prepared for guerrilla warfare and underestimated the Iraqi insurgency [11].

    5. What role did sectarianism play in the conflicts?

    • Existing sectarian divisions between Shia and Sunni populations were intensified by the conflicts in Iraq [9].
    • The Sunni Arabs felt they were being made second-class citizens which destabilized Iraq [12].
    • In Bahrain, the Shia majority felt excluded from jobs in security forces [13].
    • In Syria, Saudi Arabia encouraged anti-Shia militancy, which contributed to the proxy war [14].

    6. How did ISIS gain power and influence?

    • ISIS replaced al-Qaeda as the most extreme jihadi group [15].
    • ISIS was effective in guerrilla warfare [15].
    • ISIS gained support through propaganda and providing services, education and sermons [16].
    • ISIS imposed its cultural agenda in areas under its control [17].
    • Many people joined ISIS for economic reasons [17].
    • ISIS used chilling videos to intimidate their enemies [15].

    7. What were some of the common human rights abuses reported in these conflicts?

    • Torture was widespread, often used to extract confessions [18, 19].
    • Common methods included beatings, electric shocks, and suspension in contorted positions [18].
    • There were reports of rape in prisons [19].
    • Arbitrary arrests and detention without trial were also common [20].
    • Civilians were often killed in airstrikes [21].
    • People were punished for expressing sympathy for protestors [22].
    • Many people were forced to flee their homes and become refugees [23].

    8. What was the impact of US policies in the region?

    • The US failed to impose control in both Iraq and Afghanistan [1].
    • US actions often had unintended consequences, such as strengthening groups they opposed [1].
    • The US was accused of making mistakes and misunderstanding the culture and politics in the region [24, 25].
    • The US was criticized for their re-election strategy that prioritized political goals over the needs of the Iraqi people [25].

    9. What role did foreign fighters play in these conflicts?

    • Many foreign fighters joined ISIS, often from Tunisia [26].
    • Some foreign fighters were motivated by religious beliefs, while others were driven by economic reasons [17].
    • There was concern that Western intelligence operatives were worried about the influence of al-Qaeda and asked fighters why they were growing a beard [14].

    This FAQ is intended to provide a comprehensive overview of the key themes and issues covered in the sources. The conflicts discussed are complex, and these answers provide only a starting point for deeper exploration.

    Middle East Conflicts: 2001-2015

    Okay, here’s a timeline of key events based on the sources, focusing on the conflicts in Afghanistan, Iraq, Libya, and other relevant events in the Middle East from 2001 to 2015:

    Afghanistan

    • 2001:The US and its allies launch military operations in Afghanistan following the 9/11 attacks, targeting the Taliban [1].
    • The Northern Alliance, supported by US airstrikes, makes significant gains against the Taliban [2, 3].
    • The Taliban retreat from Kabul to Kandahar, and their forces begin to break up [2].
    • November 23: The Northern Alliance takes control of Kabul and prepares for talks with other Afghan leaders [3].
    • 2002: The initial military operations against the Taliban are largely reported as a military victory [2].
    • 2009-2012: The Taliban make a comeback in Afghanistan [4].

    Iraq

    • 1990-2003: Iraq is under UN sanctions, leading to severe humanitarian crises and a weakened state [4, 5].
    • 2003:March: The US and its allies invade Iraq [6].
    • April 28: US military checkpoint north of Kirkuk is disorganized [7].
    • April: US forces enter Baghdad [6, 8].
    • The US dissolves the Iraqi army [9].
    • June: The US establishes the Coalition Provisional Authority (CPA) to govern Iraq [9].
    • June: A US administrator disbands the 400,000-strong Iraqi army [9].
    • June: Grand Ayatollah al-Sistani issues a fatwa saying those who frame Iraq’s new constitution must be elected rather than selected by the US and the defunct Iraq Governing Council [10].
    • 2004:April 6: US Marines fight their way into Fallujah after the killing of four American civilian contractors [11].
    • June: Sovereignty is formally handed back to a US-nominated Iraqi government [12].
    • US military deaths in Iraq are very high: 848 soldiers killed and 8,002 wounded [13].
    • 2005:US military deaths in Iraq remain high: 846 killed and 5,946 wounded [13].
    • 2006:US military deaths in Iraq continue: 821 killed and 6,372 wounded [13].
    • April: Nouri al-Maliki replaces Ibrahim al-Jaafari as Prime Minister [14].
    • July: Abu Musab al-Zarqawi is killed [15].
    • 2007-2010: US forces begin to draw down in Iraq [4].
    • 2008:March: Nouri al-Maliki makes a brief visit outside the Green Zone to demonstrate the improved security situation [16].
    • August: The Iraqi government rejects a draft security agreement with the US which would have preserved indefinitely the US right to conduct military operations inside the country [17].
    • December: The Iraqi parliament votes in favor of a security agreement with the US to withdraw troops by 2011 [18].
    • 2009:June: US military forces withdraw from Iraqi cities [19].
    • 2010: US forces continue to withdraw, and US interest in Iraq wanes [20].
    • 2012: Sunni protests against the Maliki government begin in western Iraq [21].
    • 2013:March: Sunni demonstrations continue in Iraq against Nouri al-Maliki [21].
    • December: ISIS gains power and is considered the most successful leader in the Middle East [22].
    • 2014:
    • January: ISIS seizes Fallujah [23].
    • June: ISIS captures Mosul [6, 20].

    Libya

    • 2011:February: Protests against Gaddafi begin, spreading from Tunisia and Egypt [24].
    • April: The conflict escalates, with rebel forces and pro-Gaddafi forces engaged in fighting [25].
    • September: Rebel military control increases [26].
    • The Gaddafi regime is overthrown and Gaddafi is killed [27, 28].
    • Libyans find they have lost a functioning state and are at the mercy of predatory militiamen [27].
    • 2012-2014: Libya descends into chaos and violence, becoming a fragmented state with competing militias [29].
    • 2015 Libya, Syria and Yemen are being ravaged by warfare [28].

    Other Middle East Conflicts and Events

    • 2009-2015: The conflict in Yemen intensifies [29].
    • 2011:April: The author travels to Cairo, debating whether to go to Benghazi or Bahrain [30].
    • March: The ruling Sunni al-Khalifa monarchy in Bahrain, backed by Saudi troops, crushes mass protests by the Shia majority [30].
    • June: Poet Ayat al-Gormezi is sentenced to one year in prison in Bahrain [31].
    • 2011-2013: The Syrian civil war intensifies [29].
    • The Arab Spring uprisings begin and spread across the Middle East and North Africa [32].
    • Many authoritarian regimes are challenged by popular protests [32].
    • There are some successful transitions of power, but most countries experience political instability and violence [28, 33].

    General Trends

    • Sectarianism: Sectarian tensions between Sunni and Shia communities are exacerbated by regional conflicts [34].
    • Rise of Extremism: The rise of groups like ISIS demonstrates a shift towards more extreme forms of jihadism [5].
    • Western Intervention: Western military interventions often have unintended consequences and exacerbate instability [8, 35].
    • Human Rights Abuses: Torture, arbitrary arrests, and killings are widespread across the region [36-38].
    • Journalism: Eyewitness reporting by journalists is valuable, but war coverage can be deceptive, particularly when it focuses solely on military victories [2, 20, 39].

    This timeline highlights the complex and interconnected nature of the conflicts in the Middle East and Afghanistan from 2001 to 2015. It also underscores how the consequences of these events continue to shape the region today.

    The Iraq War: Miscalculations and Devastation

    The Iraq War, initiated by the US and its allies in 2003, is a central focus of the sources, which detail its profound and destabilizing consequences [1]. The invasion, though intended to remove Saddam Hussein, had far-reaching effects that continue to shape the region [2].

    Key aspects of the Iraq War discussed in the sources:

    • The Invasion and Its Aftermath: The invasion is described as a revolutionary act that ended centuries of Sunni Arab rule in Iraq [2]. The US dissolved the Iraqi army and security services, which were the main instruments of Sunni control over the Shia and Kurdish populations [2]. This action created a power vacuum and led to the rise of sectarian conflict [1]. The initial military campaign was swift, but the subsequent occupation was fraught with problems [3, 4].
    • Sectarian Divisions: The war exacerbated existing tensions between Iraq’s three main communities—Shia, Sunni, and Kurds—leading to a state of permanent confrontation [1]. The US was not fully aware of the deep divisions between Sunni and Shia Muslims [5]. This lack of understanding significantly hampered their efforts to establish a stable government [6]. The war resulted in Baghdad becoming a largely Shia city, with Sunnis fleeing or living in enclaves [7].
    • Sanctions and Their Impact: The sources highlight that pre-war sanctions had already severely damaged Iraq, creating conditions where Iraqis were more likely to engage in violence or embrace religious extremism [8]. UN sanctions are cited as a significant factor that weakened Iraq and made its population more prone to extremism [8, 9].
    • US Miscalculations and Failures: The US military and political leaders made several miscalculations. They had unrealistic expectations and received faulty advice from Iraqi expatriates who believed that US forces would be welcomed [10]. The US also underestimated the depth of Iraqi nationalism, sectarian divisions, and the potential for resistance [6]. The failure to establish a stable, representative government is a recurring theme [11-13].
    • The Rise of Resistance: The occupation faced increasing resistance from various groups, including former members of Saddam’s security forces and Islamic militants [14]. Attacks on US and British troops became more frequent and lethal, and the conflict became increasingly complex [14]. The US struggled to contain the insurgency [15].
    • The Role of the US Occupation: The US occupation was plagued by a lack of political planning [3]. It failed to address the needs of the Iraqi people, and even charged thirsty villagers for bottles of water [3]. The US was also criticized for discouraging Iraqi involvement and ignoring the needs of the local population [5].
    • Guerrilla Warfare: The sources detail the evolution of the resistance to the US occupation into a more organized and deadly guerrilla war, with bombings and ambushes becoming more sophisticated [14, 16]. The US military’s inability to effectively counter this resistance is a key factor in the war’s growing complexity [17].
    • Iraqi Perspectives: The sources highlight the views of ordinary Iraqis, who initially had mixed reactions to the invasion but grew increasingly disillusioned [9, 16, 18]. Many Iraqis felt that the US was not committed to their liberation and was more interested in its own political goals [13]. They saw the US as occupiers rather than liberators, and this perception fueled resentment and resistance [16].
    • Political and Social Instability: The war caused significant political and social instability in Iraq. The country was left deeply divided along sectarian lines, and the struggle for power among different groups led to continuous violence [1]. The government was seen by many Iraqis as a puppet of the US [19].
    • The Impact of the “Surge”: The US troop surge was meant to increase security, but it had limited long-term impact [20, 21]. The violence continued despite the increase in troop numbers.
    • The US Withdrawal: The US eventually withdrew its forces, but the Iraqi government was left with limited control over the country, and the conflicts continued [22, 23]. The US is seen to have largely provoked the civil war that raged across central Iraq [24].
    • Civil War and Sectarian Violence: The war led to a civil war and widespread sectarian violence between Shia and Sunni, including bombings, assassinations and forced displacement of communities [23-26].
    • The Rise of ISIS: The chaos and instability created by the Iraq war provided fertile ground for the rise of ISIS [27, 28]. ISIS gained power by exploiting existing sectarian tensions and capitalizing on the lack of a strong central government [29].
    • Long-Term Consequences: The sources suggest that the Iraq War did not achieve its goals of creating a peaceful and prosperous country, and that the conflict had long-term consequences [30]. The war deepened the divisions within Iraq and created a vacuum that has been filled by sectarianism and extremism [31, 32]. The war also had a negative impact on the image of the US in the Middle East and around the world [13].

    The sources portray the Iraq War as a deeply flawed endeavor with devastating consequences. They show a pattern of miscalculations, poor planning, and a failure to understand the complexities of the region.

    The Islamic State: Rise, Ideology, and Impact

    The Islamic State, also known as ISIS, ISIL, or Daesh, is a central focus of the sources, which detail its rise, ideology, and impact in the Middle East. The sources emphasize that the group’s emergence is a consequence of the chaos and instability created by the Iraq War and other regional conflicts [1].

    Origins and Rise:

    • Emergence from Instability: ISIS emerged from the chaos following the 2003 US-led invasion of Iraq, capitalizing on the power vacuum and sectarian tensions [1]. The group’s rise is linked to the broader conflicts in the Middle East, particularly in Iraq and Syria [2].
    • Exploitation of Sectarianism: ISIS gained traction by exploiting the deep-seated sectarian divisions between Sunni and Shia Muslims, particularly the alienation of the Sunni community in Iraq [2, 3]. The group presented itself as a protector of Sunni Muslims against Shia-dominated governments [3].
    • Evolution from Al-Qaeda: ISIS is described as having taken over from the al-Qaeda organization founded by Osama bin Laden as the most powerful and effective extreme jihadi group in the world [4]. However, it is also described as more violent and sectarian than al-Qaeda [4].
    • Rapid Growth: Under the leadership of Abu Bakr al-Baghdadi, ISIS grew swiftly in strength, becoming highly organized and controlled from the center [2]. By 2014, ISIS controlled a vast territory in western Iraq and eastern Syria [4].
    • Declaration of a Caliphate: In June 2014, ISIS declared itself a caliphate, a move with the potential to convulse many Islamic countries [5]. This declaration appealed to millions of young Sunni men who felt marginalized by the existing political and economic order [5].

    Territorial Control and Expansion:

    • Control of Key Cities: ISIS captured major cities like Fallujah, Mosul, Ramadi, and Palmyra, demonstrating their military capabilities [1, 4, 6, 7]. The capture of Mosul was described as an “earthquake” in the politics of Iraq and Syria [3].
    • Expansion of Territory: ISIS expanded rapidly, seizing large territories in both Iraq and Syria, and by 2015 the territory it controlled was larger than Great Britain [5, 8].
    • Strategic Importance of Territory: ISIS established control over oil and gas fields, providing it with a steady income. Control of crucial roads also helped to support the new state [8].

    Ideology and Practices:

    • Extreme Interpretation of Islam: ISIS enforces a strict and intolerant variant of Islam that is rejected by most Muslims, imposing it on all aspects of life, from women’s dress codes to the regulation of businesses [9]. The group’s ideology is a radical version of Wahhabism that includes extreme violence [10].
    • Brutal Tactics: ISIS is known for its brutality, which includes mass executions, beheadings, amputations, and floggings [11]. They are known to kill Shia Muslims and Christians [4]. The group’s propaganda films often show the execution of non-Sunni Muslims [2].
    • Enforcement of Strict Rules: ISIS imposes strict rules regarding clothing, social behavior, and religious practice. For example, women are required to wear the niqab and are not allowed to leave the house without a male relative [11, 12].
    • Propaganda and Recruitment: ISIS uses sophisticated propaganda to attract recruits, often exploiting economic grievances and feelings of marginalization [13, 14]. They offer jobs and salaries to those who join them [14, 15].

    Impact and Consequences:

    • Sectarian Conflict: ISIS is a major catalyst for sectarian violence, with its attacks targeting Shia Muslims and other minorities, thereby deepening the divide between communities [16-18].
    • Human Rights Abuses: ISIS is responsible for widespread human rights abuses, including the persecution of religious and ethnic minorities like Christians and Yazidis, and the enslavement of Yazidi women [11, 17, 19, 20].
    • Displacement: ISIS’s brutal practices have led to the mass displacement of communities within the region [21]. Many people have fled from areas under their control, seeking safety in other regions [14, 21].
    • Destabilization of the Region: The rise of ISIS has destabilized the Middle East, exacerbating existing conflicts and creating new ones, while also drawing countries like Turkey and Saudi Arabia into the conflict [8, 22, 23].
    • Challenge to Existing States: ISIS seeks to replace existing nation-states with a caliphate that transcends national borders [5, 22]. It has challenged the legitimacy of Muslim rulers throughout the world [22].

    Responses to ISIS:

    • International Coalition: The US has formed a coalition of 60 countries to oppose ISIS, but the effectiveness of this coalition has been questioned [24].
    • Military Operations: US-led air strikes have been conducted against ISIS targets, though their effectiveness is debated in the sources [25-28]. The US struggles to find reliable local partners on the ground [25, 26].
    • Complex Alliances: The fight against ISIS is complicated by conflicting interests and alliances, as some countries, like Turkey, have focused on fighting Kurdish groups rather than ISIS itself [23]. Some of the countries that are supposedly fighting ISIS had previously supported the same jihadis in Syria and Iraq [24].
    • Local Resistance: There is some local resistance to ISIS in the areas it controls, but people are often too terrified of retaliation to act openly against the group [21, 29, 30].

    Challenges in Defeating ISIS:

    • Distrust and Division: The distrust and division between the various groups opposing ISIS make it difficult to form a united front [30, 31].
    • Local Support: Even though many fear ISIS, the group has some local support in Sunni communities [14, 32].
    • Organizational Strength: ISIS’s efficient organization and ruthless tactics make it a difficult enemy to dislodge [19, 33].
    • Lack of Clear Strategy: There is no clear strategy for dealing with ISIS beyond military action, as political and social factors are not effectively addressed [25].

    In summary, the Islamic State is portrayed as a highly dangerous and complex organization that has emerged from the chaos of the Iraq War and other regional conflicts. Its extreme ideology, brutal tactics, and ability to exploit sectarian tensions have made it a major destabilizing force in the Middle East. The sources make clear that ISIS is not simply a terrorist group but a proto-state with significant resources and a clear vision for the future.

    Middle East in Crisis

    The Middle East is presented in the sources as a region undergoing a period of intense conflict and instability, with several interconnected issues contributing to the current state of affairs [1]. The sources emphasize that the current conflicts are not isolated events, but rather part of a larger pattern of instability that has been developing over the last century [2].

    Key Themes and Issues:

    • Widespread Conflict and Instability: The region is engulfed in armed conflicts ranging from full-scale wars to general breakdowns of security [1]. Central governments have collapsed, are weak, or face powerful insurgencies [1]. Civil wars are tearing apart countries like Iraq, Syria, and Yemen, with little prospect of them coming together again as unified states [1].
    • Historical Context: The sources note that the region has never been truly stable since the fall of the Ottoman Empire, experiencing foreign invasions, Arab-Israeli wars, military coups, and conflicts between different groups [2]. The current era of civil wars is a major theme [3].
    • Sectarian and Ethnic Divisions: Sectarian and ethnic struggles play a central, though not exclusive, role in the crises in Iraq, Syria, Turkey, Afghanistan, and Yemen [3]. These divisions, particularly between Sunni and Shia Muslims, have been exacerbated by regional conflicts and interventions [2]. The sources highlight how these divisions have become more militarized and deeper, with each conflict reinforcing the others, preventing solutions to individual issues [4].
    • The Impact of the Iraq War: The 2003 US-led invasion of Iraq is described as an “earthquake” whose aftershocks are still being felt [5]. It energized existing conflicts and confrontations, and it also deepened the divisions within Iraq [5].
    • The Rise of ISIS: The chaos and instability created by the Iraq War provided fertile ground for the rise of ISIS, which has further destabilized the region [5]. ISIS is not just a terrorist group but also a proto-state with significant resources and a clear vision for the future [6].
    • The Role of External Powers: The sources emphasize the role of external powers, including the US, Russia, Iran, and Saudi Arabia, in exacerbating conflicts and shaping the region’s political landscape [4, 7]. The involvement of these powers often complicates the resolution of conflicts and leads to a “cat’s cradle of conflicting interests” [7]. The US, Britain, France, and the Sunni monarchies are seen as not wanting the war to end until they can declare victory [8].
    • The Sunni-Shia Conflict: A major theme is the growing confrontation between Sunni and Shia, and between Saudi Arabia and its allies and Iran with its allies [4]. The sources indicate that this conflict is becoming more militarized and that it prevents solutions to individual issues [4].
    • The “End of Sykes-Picot”: The sources mention the “end of Sykes-Picot” as a shorthand for the collapse of the old order established after World War I, with the implication that new boundaries and political arrangements may emerge [9, 10]. The reference is to the agreement of 1916 that divided up the spoils between Britain and France, but the sources note that this agreement ignored the wishes or existence of local inhabitants [9, 10].
    • The Kurdish Question: The Kurds, who were left without a state after the Ottoman collapse, are now seeking independence in Iraq and greater autonomy in Syria [9]. This ambition is a significant factor in the current political landscape [9].
    • Cross-Infection of Conflicts: The crises and wars in the region tend to cross-infect each other, with Iraq serving as a crucible for many of the troubles now affecting other Islamic countries [11]. The conflicts are interconnected, with events in one country impacting its neighbors [11]. For example, the uprising in Syria encouraged their neighbors in Iraq, and the revolts in the two countries are running in parallel [12].
    • The Vulnerability of States: There is a growing feeling across the Middle East that the future of entire states is in doubt, which is a sentiment that hasn’t been felt since the carve-up of the Ottoman Empire after World War I [9].
    • The Impact on Civilians: The sources emphasize the human cost of these conflicts, with millions of people displaced, in need of aid, and facing the threat of violence [2, 13]. Life has never been so dangerous and uncertain for the region’s inhabitants [2].

    Specific Regional Issues:

    • Iraq: The country is disintegrating under the pressure of a mounting political, social, and economic crisis [14]. The conflict between Shia, Sunni, and Kurds is deepening to a point just short of civil war [14]. The Iraqi government’s authority extends only a few miles north and west of Baghdad [15]. The sources detail how the US failed to establish a stable government after the invasion [16, 17].
    • Syria: The country is in a state of civil war, with sectarian violence and the rise of jihadist groups like ISIS and Jabhat al-Nusra [18-20]. The conflict has become a proxy war between regional and international powers [7]. The war in Syria is spreading to neighboring countries [19]. The sources detail the increasing radicalization of the conflict and the displacement of millions of Syrians [2].
    • Yemen: The country is being crushed by Saudi air strikes and a tight economic blockade [13]. The conflict has been framed in sectarian terms, with the Houthis, a Zaidi Shia rebel movement, pitted against a Saudi-led Sunni coalition [21]. This conflict has exacerbated the Sunni-Shia divide in the region and has led to a humanitarian disaster [13].
    • Libya: The country has been reduced to a state of violence approaching that of Syria, Iraq, and Afghanistan, and that intervention by western powers has been a disaster [13]. The country is fragmented, with different militias vying for power [13].
    • Bahrain: The country has seen mass protests by the Shia majority demanding democratic reform, which were crushed by the ruling Sunni monarchy with Saudi support [22]. The sources describe the Bahrain government as targeting the Shia community and deepening its sense of alienation [23].
    • Turkey: The country is facing spillover violence from the Syrian conflict, and has also seen a renewal of the Turkish-Kurdish civil war [1, 24].

    Long-Term Trends:

    • The failure of Western Interventions: The sources emphasize that the interventions by Western powers in the Middle East have largely failed, and that they have often exacerbated the existing conflicts [8, 13].
    • Shifting Power Dynamics: The sources note that the vast wealth of the oil states in the Gulf has turned into political power, with Sunni absolute monarchies now holding the leadership of the Arab world [5].
    • The Spread of Sectarianism: The sources highlight the increasing spread of sectarianism as a major destabilizing factor in the region, which is being fueled by both local and external actors [4].

    In conclusion, the Middle East is portrayed as a region in a state of profound crisis, with multiple interconnected conflicts, deep-seated sectarian and ethnic divisions, and the involvement of numerous external powers. The sources suggest that there is no easy path to peace and stability in the region, and that the long-term consequences of the current conflicts are likely to be severe. The region is undergoing a transformation whose ultimate outcome remains uncertain, but which is sure to shape global politics for the foreseeable future.

    Regime Change in the Middle East

    Regime change is a recurring theme in the sources, often associated with the destabilization of countries, the rise of sectarian conflict, and the unintended consequences of foreign intervention. The sources discuss regime change in the context of specific countries and the broader Middle East.

    General Observations on Regime Change:

    • Destabilizing Force: Regime change is frequently depicted as a destabilizing force in the region [1-3]. The removal of existing authoritarian governments has often led to power vacuums, civil wars, and the rise of extremist groups [3-5].
    • Unintended Consequences: The sources suggest that regime change often produces unintended and negative consequences. For example, the removal of Saddam Hussein in Iraq did not lead to a stable democracy, but rather to sectarian violence and the rise of ISIS [6, 7]. Similarly, the intervention in Libya led to a fragmented state with various militias vying for power [8].
    • External Influence: Regime change is often driven or influenced by external powers, such as the United States and its allies [6, 9, 10]. However, these interventions have been criticized for their lack of understanding of local dynamics and their failure to establish lasting stability [2, 5, 7, 9, 10].
    • Rise of Extremism: Regime change has created power vacuums that have been exploited by extremist groups, such as ISIS, who then challenge the new order [1, 11, 12].
    • Failure of Western Interventions: The sources suggest that Western interventions aimed at regime change have largely failed, and often exacerbated existing conflicts [9, 10, 13, 14].

    Regime Change in Specific Countries:

    • Iraq: The 2003 US-led invasion of Iraq resulted in the overthrow of Saddam Hussein’s regime [6]. However, this did not lead to a stable, democratic government. Instead, it created a power vacuum, which was filled with sectarian violence, a Sunni insurgency, and the rise of ISIS [9-11, 15]. The sources highlight the lack of a viable Iraqi opposition ready to take over [16]. The US was unable to create a government that was seen as legitimate by the majority of Iraqis [9, 10, 16]. The US preference for a Sunni dominated government was at odds with the Shia majority [7, 10].
    • Libya: The 2011 uprising against Muammar Gaddafi, supported by NATO intervention, led to his overthrow and death [17, 18]. However, the country descended into chaos, with various militias vying for control and the government unable to assert its authority [8, 19]. The sources point out that the opposition to Gaddafi was dependent on external support and lacked a clear program beyond his removal [17, 18, 20].
    • Syria: The sources show that the conflict in Syria started as a popular uprising against the government, but it quickly became a sectarian conflict [12]. The White House has stated that its top priority is regime change in Syria, but the sources note that this is a recipe for a long and drawn out conflict [21]. The rebels have not been able to overthrow the government [22].
    • Yemen: The sources describe the possibility of regime change in Yemen as a result of the Arab Spring protests [23, 24]. However, the country is facing the possibility of a civil war, and a vacuum of power [23, 25].

    Impact on Regional Stability:

    • Sectarian Conflict: Regime change has often exacerbated sectarian tensions. In Iraq, the overthrow of Saddam Hussein led to increased conflict between Sunni and Shia communities [3, 7, 9, 10]. In Syria, the uprising against the Assad regime has taken on a sectarian character [12].
    • Rise of Extremist Groups: The sources emphasize that the chaos created by regime change provides an opportunity for extremist groups to gain power and influence [1, 11].
    • Regional Power Struggles: Regime change has also intensified regional power struggles [7, 9, 10]. Countries like Iran and Saudi Arabia have been vying for influence in the region, and have taken sides in conflicts such as the one in Syria [26].
    • End of Old Order: Regime change is presented as a part of the “end of Sykes-Picot,” the old order established after World War I [27]. This suggests that the region is undergoing a fundamental transformation that could lead to new boundaries and political arrangements.

    Challenges and Future Considerations:

    • Lack of Viable Alternatives: The sources note a lack of viable, organized, and widely supported alternatives to the existing regimes [16]. In many cases, the opposition groups are weak, fragmented, and dependent on foreign powers [17, 20].
    • Difficulty in Building Stable Governments: Even when regime change is achieved, building stable and legitimate governments is extremely difficult. The sources highlight the challenges of establishing a power-sharing agreement and a government that is supported by the population [3, 10].
    • Need for Local Solutions: The sources imply that sustainable solutions to the conflicts in the Middle East must come from within the region and must address the underlying issues of sectarianism, inequality, and lack of political representation [3, 4, 10].

    In conclusion, the sources portray regime change as a complex and often counterproductive process that has significantly destabilized the Middle East. The removal of existing regimes has frequently led to unforeseen consequences, including civil wars, sectarian violence, and the rise of extremist groups. The sources suggest that external interventions aimed at regime change have often failed, and that lasting peace and stability in the region require locally-driven solutions that address the underlying causes of conflict.

    The Arab Spring: A Complex Revolution

    The Arab Spring is presented in the sources as a complex series of events with both democratic aspirations and significant unintended consequences [1, 2]. It is described as a period of widespread popular protests in the Middle East and North Africa, beginning in 2011, that aimed to overthrow long-standing authoritarian regimes [3, 4]. However, the sources also emphasize that the term “Arab Spring” is misleading, as it overstates the progressive nature of these events [1, 2].

    Initial Motivations and Goals:

    • Desire for Democracy: Millions of people across the region sought an end to corrupt and brutal police states, and hoped to establish honest, accountable, law-bound governments [1].
    • Demand for Civil Rights: Protesters called for free elections and an end to discrimination [1].
    • Rejection of Authoritarianism: The uprisings were a direct challenge to the existing political order, where power was concentrated in the hands of a small, often corrupt elite [5].

    Complications and Challenges:

    • Sectarian Divisions: The sources emphasize that demands for democracy had different implications in various countries [1, 6]. In Bahrain, for example, democratic reforms would lead to the Shia majority taking power from the Sunni minority [1]. In Syria, the opposite would be true, with the Sunni majority replacing the ruling Alawite minority [1].
    • Militant Islamism: The sources note that militant Islamism was always a part of the Arab Spring, and that it was not a purely progressive revolution that was later hijacked [4].
    • External Influence: Some of the protests were influenced or manipulated by neighboring countries and foreign powers [7, 8].
    • Militarization of Dissent: When peaceful protests were met with violence, the dissent became militarized, leading to civil wars and chaos [4].

    Outcomes and Consequences:

    • Mixed Results: The Arab Spring did not result in a uniform outcome. While it led to the overthrow of some leaders, it did not produce stable democracies in most cases [9].
    • Authoritarian Resurgence: In several countries, such as Egypt and Bahrain, more repressive governments took power [9, 10].
    • Civil Wars: Libya, Syria, and Yemen were ravaged by warfare [9]. The sources note that Libya, previously peaceful, descended into violence approaching the levels seen in Syria and Iraq [11].
    • Increased Oppression: The clampdown on opposition grew ever more severe in many countries [12].
    • Rise of Extremist Groups: The power vacuums created by the uprisings were often filled by extremist groups such as ISIS [7, 13].
    • Disillusionment: Many people in the region felt deceived, and the term “Arab Spring” was replaced by “Arab Autumn” or “Arab Winter” in many media outlets [3].

    Specific Country Examples:

    • Libya: The uprising against Gaddafi was initially praised in the West, but the country descended into chaos after his removal [14]. The opposition was dependent on NATO and did not have the strength to fill the power vacuum [9, 15].
    • Syria: The protests against the Assad regime quickly turned into a civil war. The conflict became a proxy war, with regional and international powers backing different sides [16].
    • Bahrain: The Sunni monarchy, backed by Saudi troops, crushed mass protests by the Shia majority [17, 18]. The government brought in foreign Sunni to strengthen the security forces [18].
    • Yemen: The largely peaceful transfer of power from President Ali Abdullah Saleh was initially seen as a positive result of the Arab Spring, but the country was later torn apart by civil war [19].
    • Egypt: Despite the mass protests in Tahrir Square, the protesters never seized state power, and the country ended up under an even more repressive police state [10].

    Role of Media:

    • Initial Support for Protests: Foreign journalists and satellite television stations such as Al Jazeera Arabic played a role in publicizing the uprisings [20].
    • Government Restrictions on Media: In response, governments restricted journalists by denying visas, expelling correspondents, or even arresting them [20].
    • Misleading Portrayals: The Western media often portrayed the uprisings as “bourgeois” revolutions led by secular, pro-Western individuals, which was deceptive [7]. The sources note that the media was also credulous in broadcasting claims about government atrocities while dismissing government denials [14].

    Overall Assessment:

    • Not a Uniform Movement: The Arab Spring was not a single, unified movement, but a series of interconnected uprisings with diverse goals and outcomes [4].
    • Failure to Achieve Lasting Change: While the uprisings initially sparked hope for democracy, they ultimately failed to create lasting democratic change in most of the countries affected [9].
    • Exacerbation of Existing Conflicts: The Arab Spring exacerbated sectarian and political tensions, leading to violent conflict and instability [12].

    In conclusion, the Arab Spring was a complex and multifaceted series of events that initially held great promise for democratic change, but ultimately resulted in a mix of outcomes, including increased authoritarianism, civil wars, and the rise of extremist groups [9]. The sources highlight the importance of understanding local contexts and the unintended consequences of foreign intervention when assessing these events. The Arab Spring is not a singular event, but rather a collection of uprisings with different goals and outcomes, the effects of which are still being felt in the Middle East [4, 13].

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Al Riyadh Newspaper, April 6, 2025: Partnerships, Economic Developments, Art Exhibitions, Sudan, Lebanon, Syria, Infrastructure Projects

    Al Riyadh Newspaper, April 6, 2025: Partnerships, Economic Developments, Art Exhibitions, Sudan, Lebanon, Syria, Infrastructure Projects

    Multiple articles from Al-Riyadh newspaper cover a range of topics. Recent events in Saudi Arabia are highlighted, including partnerships, economic developments, and cultural initiatives like Ramadan events and art exhibitions. Regional issues are also addressed, such as the ongoing conflicts in Sudan and Gaza, as well as diplomatic efforts in Lebanon and Syria. Furthermore, the publication discusses sports, business regulations, infrastructure projects, and social topics relevant to the Kingdom. These articles collectively offer insights into current affairs and the Kingdom’s multifaceted activities.

    01
    تحت رعاية خادم الحرمين الشريفين.. تكريم الفائزات بجائزة الأميرة نورة للتميُّز النسائي في دورتها السابعة الأربعاء المقبل

    Understanding the Source Material: A Study Guide

    Quiz: Short Answer Questions

    1. What is the significance of the real estate procedures recently directed by the Crown Prince Muhammad bin Salman?
    2. According to Ambassador Al-Sheikh, what was the main goal of the Saudi-Georgian Business Forum held in Tbilisi?
    3. What potential positive impact could the announced US tariffs have on the Saudi stock market, according to Mohammad Al-Hazmi?
    4. What were the key issues discussed during the meeting between Lebanese officials and US envoy Morgan Ortagus?
    5. What is the primary architectural style being used in the renovation of the Al-Mashqi Mosque in Asir?
    6. What are the main strategic objectives behind the project to rehabilitate historical mosques in Saudi Arabia?
    7. What is the King Salman Humanitarian Aid and Relief Centre doing to support Sudan, as mentioned in the excerpts?
    8. What is the main goal of Saudi Arabia’s efforts to become a global hub for esports, as highlighted in the report?
    9. According to Dr. Nouf Al-Ghamdi, what are some of the expected economic consequences of the US tariff increases?
    10. What was the primary focus of the royal decree concerning real estate regulations north of Riyadh, as mentioned in Dr. Saud Al-Murshid’s article?
    01
    ولي العهد والرئيس الإيراني يبحثان تطورات الأحداث في المنطقة

    Quiz: Answer Key

    1. The real estate procedures aim to elevate the capital and other cities economically in line with the Kingdom’s Vision 2030, fulfill citizens’ needs, and create a balance between supply and demand in the real estate sector.
    2. The main goal of the forum was to strengthen the Saudi-Georgian partnership and investment, especially in light of Saudi Arabia’s Vision 2030, and to introduce representatives of each country’s business environment.
    3. The US tariffs could potentially increase the attractiveness of the Saudi stock market due to concerns related to the tariffs’ impact, leading to an inflow of migrating capital and improved liquidity in the Saudi financial market.
    4. The key issues discussed included the situation in southern Lebanon, the work of the international monitoring committee, the Israeli withdrawal, and the overall situation in the south, as well as measures to prevent any chaos or smuggling across the Lebanese-Syrian borders.
    5. The primary architectural style being used in the renovation of the Al-Mashqi Mosque is the traditional Sarat style, characterized by its unique design and the use of natural materials from the Sarat mountains.
    6. The main strategic objectives include rehabilitating historical mosques, restoring their architectural authenticity, highlighting their historical and cultural significance, and benefiting from their original architectural features in modern mosque designs.
    7. The King Salman Humanitarian Aid and Relief Centre is distributing food baskets to those most in need in Sudan, as part of a project to support food security in the country for the year 2025.
    8. The main goal is to establish Saudi Arabia as a leading global center for esports by providing a stimulating environment for players and developers, investing in strong infrastructure, and hosting major international competitions.
    9. Dr. Al-Ghamdi suggests the US tariff increases could lead to higher production and import costs, potentially passed on to consumers, contributing to a new inflationary wave and causing capital flight from US assets.
    10. The primary focus of the royal decree was to reorganize the real estate market, achieve balance, address the rise in land prices and rents, streamline relevant regulations, and ultimately create a more stable and sustainable real estate market for citizens.
    01
    لبنان: لقاءات إيجابية بين عون وسلام والمبعوثة الأميركية

    Essay Format Questions

    1. Analyze the interconnectedness of Saudi Arabia’s Vision 2030 with the various initiatives and events highlighted in the provided news excerpts, such as real estate development, international partnerships, and cultural projects.
    2. Discuss the potential implications of increasing global economic and political uncertainties, as suggested by the reports on US tariffs and regional conflicts, on Saudi Arabia’s economic diversification and investment strategies.
    3. Evaluate the significance of Saudi Arabia’s growing engagement in international partnerships and forums, using the Saudi-Georgian relationship as a primary example, and consider the benefits and challenges of such collaborations.
    4. Examine the role of cultural and heritage preservation, as seen in the restoration of historical mosques and the promotion of Saudi arts and culture, within the broader context of Saudi Arabia’s national identity and its Vision 2030 goals.
    5. Assess the multifaceted humanitarian efforts undertaken by Saudi Arabia, as exemplified by the work of the King Salman Humanitarian Aid and Relief Centre and its engagement in regional stability efforts, and discuss their impact on the Kingdom’s international standing.
    01
    السفير آل الشيخ: بعثات المملكة في الخارج تمثل الوجه الحقيقي لوطن رائد في مختلف المجالات

    Glossary of Key Terms

    • Vision 2030: The Kingdom of Saudi Arabia’s ambitious strategic framework launched to diversify its economy, develop public service sectors such as health and education, and position the country as a global hub.
    • Real Estate Procedures: Official actions and regulations related to the buying, selling, and development of land and properties, often implemented to stabilize the market and meet housing needs.
    • Supply and Demand: Basic economic principle referring to the amount of a commodity, product, or service available (supply) and the desire of buyers for it (demand), which influences prices.
    • Tariffs: Taxes imposed by a government on goods or services imported from other countries, often used to protect domestic industries or as a tool in international trade relations.
    • Stock Market Liquidity: The ease with which assets, such as stocks, can be bought or sold without significantly affecting their price; high liquidity generally indicates a healthy market.
    • International Monitoring Committee: A body composed of representatives from different countries or international organizations tasked with observing and reporting on specific situations, often related to peace agreements or border issues.
    • Architectural Authenticity: The genuine character of a building or structure in terms of its original design, materials, and construction techniques, often a focus in restoration projects.
    • Humanitarian Aid: Assistance provided to people in need, often during or after crises such as natural disasters or conflicts, aimed at alleviating suffering and meeting basic needs.
    • Esports Hub: A central location or region that fosters and supports electronic sports through infrastructure, events, talent development, and investment.
    • Inflationary Wave: A period of sustained increase in the general price level of goods and services in an economy, leading to a decrease in the purchasing power of money.
    • Capital Flight: The movement of large amounts of money out of a country due to economic or political instability, or in response to policy changes like tariffs.
    • Real Estate Market Stability: A condition in the property sector characterized by consistent prices, balanced supply and demand, and a lack of extreme fluctuations, fostering confidence among buyers and sellers.
    • Cultural Heritage Preservation: Efforts to protect and maintain historical, artistic, and cultural artifacts, sites, and traditions for future generations.
    • International Partnerships: Collaborative relationships between two or more countries, often involving economic, political, or cultural cooperation to achieve mutual goals.
    • Humanitarian Efforts: Actions undertaken to alleviate human suffering and improve the well-being of individuals and communities, often in response to crises or chronic needs.
    01
    مانشستر سيتي يتعادل سلبيا مع مانشستر يونايتد بالدوري الإنجليزي

    Briefing Document: Analysis of “alriyadh.com” Newspaper Excerpts (April 6, 2025)

    This briefing document summarizes the main themes and important ideas and facts presented in the provided excerpts from the April 6, 2025 issue of the Saudi Arabian newspaper “Al Riyadh.” The excerpts cover a diverse range of topics, including regional politics, economic development initiatives, cultural events, international relations, and social issues within the Kingdom and beyond.

    01
    غدًا تنطلق النسخة الأولى من منتدى الاستثمار الرياضي

    Main Themes:

    • Saudi Arabia’s Vision 2030 and Economic Diversification: Several articles highlight the ongoing efforts to achieve the goals of Vision 2030, particularly in economic diversification and improving the quality of life for citizens.
    • Strengthening International Partnerships and Investment: The newspaper emphasizes Saudi Arabia’s active engagement in building and enhancing partnerships with other nations, focusing on economic and investment cooperation. Georgia is presented as a key partner in this regard.
    • Regional Political Developments and Conflicts: The excerpts touch upon various ongoing regional conflicts and political situations, including the situation in southern Lebanon, the conflict in Sudan (Darfur), and Israeli actions in Gaza and Syria.
    • Cultural and Social Developments within Saudi Arabia: The newspaper covers various cultural initiatives, events, and social programs aimed at promoting national heritage, arts, and empowering different segments of society.
    • Global Economic Trends and Their Impact: The potential impact of US tariffs on the Saudi stock market is discussed, along with broader global economic shifts.
    01
    وزير المالية يزور الكراج وبرنامج NTDP

    Key Ideas and Facts:

    1. Saudi Arabia’s Vision 2030 and Economic Development:

    • Real Estate Sector Boost: Crown Prince Mohammed bin Salman directed initiatives to boost the real estate sector, aiming to balance supply and demand and provide housing for citizens. This is seen as aligning with the goals of Vision 2030.
    • Quote: “…الإجراءات العقارية التي وجه بها سمو ولي العهد الأمر محمد بن سلمان بن عبدالعزيز، تستهدف من أجل تعزيز القطاع الخاص، وتوفير منتجات عقارية للمواطن والأداة والطلب، وخلق التوازن بين العرض…”
    • Saudi Stock Market Attractiveness: The potential imposition of US tariffs is discussed as a factor that could increase the attractiveness of the Saudi stock market due to investors seeking stable alternatives.
    • Quote (Mohammed Al-Hazmi): “وقال من المحتمل أن يسهم تدفق رؤوس الأموال المهاجرة إلى أسواق الأسهم السعودية وعودتها، نتيجة للمخاوف المتعلقة بتأثرات تطبيق التعرفة الجمركية، في تعزيز النمو في السوق المالية السعودية بشكل ملحوظ.”
    • Regulation of the Real Estate Market: The Real Estate General Authority is actively monitoring media and social media to regulate the market and prevent exploitation.
    • Quote (Dr. Saud Al-Muraished): “…واتخاذ كل ما من شأنه أن يحقق سوقًا عقارية متوازنة وأكثر استقرارًا واستدامة…”
    • Riyadh as an Events Hub: Riyadh is developing into a major center for events, fostering social cohesion and celebrating national occasions like Eid.
    • Quote (Fahd bin Saad Al-Quthami): “حينما تصنع الرياض البهجة لا تكتفي بالتفاصيل، إما أن تدهشك بتلبية التوقعات، وليالي العيد كانت شاهدة على تحّول مدروسًا يعكس توجهًا استراتيجيًا نحو تعزيز التلاحم الاجتماعي…”
    01
    الخريجي يتسلّم شارة منتدى الاستثمار الرياضي نيابة عن وزير الخارجية

    2. Strengthening International Partnerships and Investment (Focus on Georgia):

    • Enhanced Saudi-Georgian Relations: The Saudi Ambassador to Georgia noted the “ascending” relations between the two countries, highlighting multiple meetings and forums aimed at strengthening partnership and investment.
    • Quote (Ambassador Al-Sheikh): “نوه سفير خادم الحرمين الشريفين لدى جورجيا والسفير المقيم لدى أرمينيا الشيخ آل عبد الرحمن بن سلمان بالعلاقات السعودية – الجورجية.”
    • Tbilisi Silk Road Forum: The forum served as a platform to enhance cooperation, with significant participation from international partners and the signing of agreements, including the establishment of a Saudi-Georgian Business Council.
    • Quote (Ambassador Al-Sheikh): “وكان هدف المنتدى تعزيز الشراكة بين المملكة وجمهورية جورجيا، فقد تم اغتنام فرص التكامل والاستثمار وتوقيع المنتدى وصاحب السعادة اتفاقية إنشاء المجلس الأعمال السعودي – الجورجي…”
    • Saudi-Georgian Investment Forum (Tbilisi, February 2024): This forum, attended by the Saudi Minister of Investment and the Georgian Vice Prime Minister, aimed to promote investment opportunities and highlighted the shared strategic goal of linking transportation and logistics sectors with Europe.
    • Quote (Minister of Investment Khalid Al-Falih): “وأبان معالي الفالح في وقته أن المملكة وجمهورية جورجيا تتشاركان في نفس الهدف الاستراتيجي وهو ربط قطاع النقل والخدمات اللوجستية بآسيا بأوروبا حيث يحمل القطاع إمكانات كبيرة…”
    • Growth in Trade Exchange: The volume of trade exchange between Saudi Arabia and Georgia reached approximately 162 million Saudi Riyals in 2023, with Saudi exports constituting 31% and Georgian imports 69%. Both countries aim to increase this volume.
    • Saudi-Georgian Coordination Council: A memorandum of understanding was signed to establish a “Saudi-Georgian Coordination Council.”
    01
    خطيب المسجد الحرام: مواسم الخير لا تنقضي وأعمال البر لا تنقطع

    3. Regional Political Developments and Conflicts:

    • Lebanon: US Deputy Assistant Secretary Morgan Ortagus met with Lebanese officials, including President Aoun and Prime Minister Salam, to discuss the situation in southern Lebanon, the role of the international monitoring committee, and Israeli violations. The implementation of UN Resolution 1701, aimed at establishing state control and disarming non-state actors, was also discussed.
    • Quote (Lebanese Presidency Statement): “وأفاد بيان الرئاسة اللبنانية بأن «أجواء بناءة» سادت اللقاء الذي عقد في القصر الجمهوري في بعبدا بين عون وأورتاغوس، مضيفًا أنهما بحثا «ملفات الجنوب اللبناني، وعمل لجنة المراقبة الدولية، والانسحاب الإسرائيلي والوضع في الجنوب».”
    • Sudan (Darfur): The World Food Programme suspended aid in Darfur following the killing of aid workers in ongoing battles. Thousands fled Khartoum due to the conflict, and many countries evacuated their citizens. The UN had previously warned of the distribution of arms to civilians and the potential for ethnic clashes.
    • Quote: “في 16 أبريل، أعلن برنامج الأغذية العالمي التابع للأمم المتحدة بعد مساعداته، تعليق مقتل عدد من عمال الإغاثة في المعارك الدائرة في دارفور (غرب) عند الحدود مع تشاد.”
    • Gaza: Israeli military operations continued in Rafah, Gaza, with renewed airstrikes. Health authorities reported a rising number of casualties and difficulties in reaching those under the rubble.
    • Syria: Syria accused Israel of “deliberately destabilizing” the country following a series of airstrikes targeting military sites. The Syrian Observatory for Human Rights reported casualties. The government also responded to a report by Amnesty International regarding mass killings of Alawite civilians.
    01
    «التعريفات الجمركية الجديدة» هزة عنيفة دافعة لهجرة رؤوس الأموال الأميركية

    4. Cultural and Social Developments within Saudi Arabia:

    • “In the Love of Khalid Al-Faisal” Exhibition: An exhibition was held in Jeddah as part of the Jeddah Season 2025, honoring Prince Khalid bin Faisal bin Abdulaziz.
    • Hail Events During Eid Al-Fitr: Hail witnessed over 550,000 visitors to its parks and recreational areas during Eid Al-Fitr, enjoying various cultural and entertainment activities.
    • Development of Al-Mashqi Mosque in Asir: The Al-Mashqi mosque, one of the oldest historical mosques in the Asir region, is being restored in the traditional Sarat style as part of the Prince Mohammed bin Salman Project for the Development of Historical Mosques.
    • Quote: “يبرز مسجد المشقي في قرية المشقي الواقعة شرق جنوب مدينة أبها بنحو 32 كلم، بصفته أحد أقدم المساجد التاريخية في منطقة عسير الذي بني في أول عام هجري، بين عامي 73-75هـ، ليشمله مشروع الأمير محمد بن سلمان لتطوير المساجد التاريخية في مرحلته الثانية…”
    • King Salman Humanitarian Aid and Relief Centre: The center distributed food baskets to those in need in Sudan and Syrian refugees in Lebanon, highlighting Saudi Arabia’s ongoing humanitarian efforts.
    • Quote: “وزّع مركز الملك سلمان للإغاثة والأعمال الإنسانية 2.000 سلة غذائية الأكثر احتياجًا للأسر المحلية والنازحة في ولاية عطبرة نهر النيل بجمهورية السودان، استفاد منها 12.001 فرد…”
    • Saudi Internal Auditors Ranked Among Top Globally: The Saudi Association for Internal Auditors’ progress reflects positively on the profession in the Kingdom, placing it among the top 10 professional associations globally according to the International Institute of Internal Auditors.
    • Quote: “انعكس التقدم هذا بأن السعودية للمراجعين الداخليين، لتصبح ضمن تقييم وفق عالميًا، مهنية جمعيات 10 أفضل الداخليين، مما يؤكد للمراجعين الدولي المعهد في المملكة إليها وصلت التي المرموقة المكانة في مستمرة الجمعية أن مؤكدًا القطاع، هذا المشهد في المملكة حضور لترسيخ جهودها المهني الدولي…”
    • Growth of E-Sports in Saudi Arabia: The Kingdom is striving to become a global hub for e-sports, with significant investments and successful Saudi teams achieving international recognition.
    • Quote: “في ظل التوجهات المستقبلية التي تعتمد على الابتكار والتطور التكنولوجي، أصبحت الرياضات الإلكترونية من أبرز المجالات الريادية في المملكة العربية السعودية.”
    • Empowerment of People with Disabilities: The education administration in Al-Ahsa is investing in programs to empower students with disabilities, enabling their participation in various fields, including industry.
    • Quote: “أخذت رؤية المملكة 2030 الطموحة على عاتقها الأخذ بيد جل أبناء الوطن وتمكينهم ليكونوا منتجين، ليسهموا في مستقبل هذا الوطن العظيم وفق قدرته، ومنح ذوي الإعاقة فرصًا ليكونوا جزءًا فعالًا وسط مجتمع حيوي…”
    01
    اكتشافات أثرية جديدة بمعبد الرامسيوم بمحافظة الأقصر جنوب مصر
    • “Ela’a” Academy for Lifelong Learning: The Royal Commission for AlUla launched “Ela’a,” the first academy of its kind in Saudi Arabia to adopt the concept of lifelong learning, aiming to empower the local community and develop human capital in line with Vision 2030.
    • Quote: “أطلقت الهيئة الملكية لمحافظة العلا أكاديمية العلا للتعلم مدى الحياة )إعلاء(، وهي الأولى من نوعها التي تتبنى مفهوم التعلم مدى الحياة في المملكة ضمن مساعيها لتنمية القدرات البشرية بما يحقق مستهدفات رؤية 2030…”
    • Cultural Scene in March: The Ministry of Culture and its specialized bodies implemented various cultural programs and initiatives in March, reflecting a growing cultural movement in the Kingdom. This included “Ramadan Season” events, participation in the “Ahmed Mater: Aeriel” exhibition in Shanghai, the launch of the third edition of the Playwriting Competition, and Saudi Arabia’s participation in the London International Book Fair 2025.
    • Quote: “شهد شهر مارس الفائت زخمًا ثقافيًا نشطًا في المملكة العربية السعودية، حيث نفذت وزارة الثقافة وهيئاتها المتخصصة سلسلة من البرامج والمبادرات الثقافية النوعية، التي تعكس تنامي الحراك الثقافي المحلي السعودي وتعزز حضوره العالمي، في ظل رؤية المملكة 2030 التي تضع الثقافة في قلب التنمية.”
    • King Salman Global Academy for the Arabic Language: The academy continues its efforts to promote the Arabic language globally, launching the “Arabic Language Month in Spain” program and preparing for its fourth annual conference focusing on the digital environment and the lexicographical industry.
    • Quote (Dr. Saleh bin Abdullah Al-Washmi): “يواصل مجمع الملك سلمان العالمي للغة العربية جهوده الهادفة إلى تعزيز مكانة اللغة العربية عالميًا، وتنفيذ برامجه النوعية محليًا ودوليًا، في سياق دعم انتشارها علميًا وثقافيًا.”
    • Saudi Film Festival Announces Lineup: The Saudi Film Festival, organized by the Cinema Association in partnership with Ithra, announced the list of participating films in its 11th edition.
    01
    ولاء باحفظ الله» في لجنة تحكيم مسابقة الأفلام الروائية الطويلة بمهرجان أفلام السعودية

    5. Global Economic Trends and Their Impact:

    • Potential Impact of US Tariffs: The article discusses the potential for US tariffs to negatively impact US imports and potentially lead to a trade war. However, it also suggests that this could make the Saudi stock market more attractive to investors seeking stable havens.
    • Quote (Dr. Nouf Al-Ghamdi): “ولفتت الغامدي إلى انعكاس هذه التطورات سلبًا على ثقة المستثمرين، حيث تراجعت مؤشرات الثقة بالاقتصاد الأمريكي إلى أدنى مستوياتها منذ أزمة 2008، وفقًا لبيانات «كونفرنس بورد».”
    • Growing Boycott Movement Against US Goods: In response to potential tariffs, a growing movement to boycott American goods is emerging in affected countries, utilizing social media to organize and share information on alternative products and brands.
    • Quote: “ردًا على رسوم ترمب.. تنامي حركة مقاطعة البضائع الأميركية في الدول المتضررة”

    Overall Significance:

    These excerpts from “Al Riyadh” provide a snapshot of Saudi Arabia’s multifaceted development and its active role in the regional and global landscape. The strong emphasis on Vision 2030 initiatives, particularly in economic diversification, infrastructure development, and cultural enrichment, is evident. The Kingdom’s commitment to fostering international partnerships, especially in the economic sphere, is highlighted through the focus on Saudi-Georgian relations. At the same time, the newspaper acknowledges and reports on the complex and often challenging political and humanitarian situations in the wider Middle East and Africa. The coverage of cultural and social programs underscores the Kingdom’s efforts to empower its citizens and promote its heritage and arts. Finally, the discussion of global economic trends and their potential impact on Saudi Arabia demonstrates an awareness of the interconnected nature of the world economy.

    01
    برشلونة يهدر فرصة تعزيز صدارته للدوري بتعادله مع بيتيس

    Saudi Arabia: Vision 2030 and Key Developments

    Frequently Asked Questions (FAQ)

    1. What are the key objectives of Saudi Arabia’s Vision 2030, as highlighted in these articles? Saudi Arabia’s Vision 2030, as emphasized in these sources, aims at diversifying the Kingdom’s economy away from oil dependency, enhancing the quality of life for its citizens, and establishing Saudi Arabia as a global leader in various sectors. This includes developing non-oil sectors like tourism, technology (especially e-sports), and real estate, fostering international partnerships and investments, promoting cultural exchange, and empowering its citizens through education and job creation. The vision also focuses on preserving the Kingdom’s cultural and historical heritage while embracing modernity and openness.

    2. How are Saudi Arabia and Georgia strengthening their bilateral relations, particularly in economic and investment sectors? Saudi Arabia and Georgia are actively enhancing their partnership through increased diplomatic engagement, business forums, and the signing of numerous agreements and memoranda of understanding (MoUs). Key initiatives include the establishment of a joint Saudi-Georgian Business Council to boost mutual investments, facilitate trade, and explore opportunities in sectors such as transportation, energy, and tourism. The two countries have also focused on streamlining trade processes, avoiding double taxation, and promoting direct air links to foster economic and people-to-people connections, aligning with Saudi Vision 2030’s goals for international collaboration and investment attraction.

    3. What is the significance of the recent real estate regulations issued in Saudi Arabia, and what are they intended to achieve? The recent real estate regulations in Saudi Arabia, spearheaded by Crown Prince Mohammed bin Salman, aim to reorganize and stabilize the real estate market. These measures include lifting construction halts in certain areas, providing ready-to-build residential lands for citizens under specific conditions, and revising related regulations. The primary objectives are to create a balanced and sustainable real estate market, increase homeownership among citizens, protect the rights of all stakeholders, and ultimately contribute to the Kingdom’s economic growth by stimulating construction activities.

    4. How is Saudi Arabia developing its e-sports industry, and what achievements have been made in this sector? Saudi Arabia is making significant strides in developing its e-sports industry to become a global hub. This involves creating a supportive environment for players and developers through continuous support and substantial investments in infrastructure and initiatives. Saudi teams have achieved international recognition by winning major tournaments, such as the “Falcon” team’s victory in the e-sports World Cup in the “Gaming” season. These successes, backed by the leadership’s strategic vision, are positioning Saudi Arabia as a major force in the global e-sports arena and contributing to the diversification of the national economy and the digital sector.

    5. What efforts are being made to preserve and develop historical mosques in Saudi Arabia? Saudi Arabia has launched a comprehensive project, spearheaded by Crown Prince Mohammed bin Salman, to restore and rehabilitate historical mosques across the Kingdom. The second phase of this initiative includes the development of the Al-Mashqi Mosque in Asir, aiming to revive its original architectural style and historical significance. The project focuses on using natural materials from the region and adhering to traditional architectural designs. The broader goals of this initiative are to preserve the historical and architectural heritage of these mosques, enhance their role in worship, and highlight the cultural and religious depth of Saudi Arabia, aligning with the Vision 2030’s emphasis on national heritage.

    6. How might the recent US tariffs impact Saudi Arabia’s stock market and economy? According to financial experts cited in the article, the recent US tariffs could potentially increase the attractiveness of the Saudi stock market due to concerns related to the effects of these tariffs and the possible return of migrating capital. The stability of the Saudi economy and the available investment opportunities, especially in line with the diversification goals of Vision 2030, could draw investors seeking safer and more promising markets. This inflow of funds might improve liquidity in the Saudi financial market and contribute to overall economic growth, particularly as investors look for alternatives amid global trade uncertainties.

    7. What role does the King Salman Humanitarian Aid and Relief Centre (“KSrelief”) play in international humanitarian efforts? The King Salman Humanitarian Aid and Relief Centre (“KSrelief”) is the Kingdom of Saudi Arabia’s primary entity for providing international humanitarian aid and relief. It undertakes a wide range of projects aimed at alleviating suffering and addressing the needs of vulnerable populations around the world. Recent examples include the distribution of food baskets in Sudan and Lebanon to support food security for those affected by crises. KSrelief’s efforts reflect Saudi Arabia’s commitment to humanitarian principles and its active role in addressing global humanitarian challenges.

    8. How is Saudi Arabia supporting people with disabilities and promoting their inclusion in society and the workforce? Saudi Arabia, in line with its Vision 2030, is actively working to empower people with disabilities and ensure their full rights and integration into society. The Ministry of Education and related administrations are investing in educational and rehabilitation programs tailored to their needs. Initiatives like the “World of Industry” program in Al-Ahsa exemplify these efforts by providing vocational training and opportunities for individuals with disabilities to contribute to the nation’s development and showcase their capabilities, including participating in significant national projects.

    01
    كوماندو جروب” تحصد بطولة دبي الدولية لرابطة أبوظبي لمحترفي الجوجيتسو

    Saudi-Georgia Bilateral Relations: Growth and Cooperation

    Saudi Arabia and Georgia share increasingly strong bilateral relations characterized by growing cooperation in various fields. These relations have witnessed notable development in diplomatic and political ties.

    A significant aspect of Saudi-Georgia relations is the growing economic cooperation and investment between the two nations. The bilateral trade volume reached approximately 162 million Saudi Riyals in 2023. During this period, Saudi exports constituted 31% of this volume, while Georgian imports represented 69%.

    Further bolstering economic ties, the Saudi-Georgian Business Forum was held in Tbilisi in October 2024, with the participation of over 200 companies from both sides. This forum witnessed the signing of several important commercial agreements and partnerships in key sectors such as transport, energy, and tourism, reflecting a mutual commitment to enhancing economic and investment cooperation.

    Tourism also plays a role in the relationship, with Georgia experiencing a notable increase in the number of Saudi tourists visiting the country. This rise is partly attributed to the fact that Saudi citizens do not require a visa to enter Georgia, facilitating travel between the two nations.

    Both Saudi Arabia and Georgia have expressed their commitment to strengthening bilateral relations and developing cooperation across various fields in a way that serves the interests of both countries. This commitment is further evidenced by the signing of an agreement for the Saudi-Georgian Coordination Council.

    His Excellency the Saudi Ambassador to Georgia, Sheikh Ali bin Abdulrahman bin Salman Al Sheikh, who is also the non-resident Ambassador to Armenia, has highlighted the efforts undertaken by the Saudi embassy in Georgia to further develop relations between the two friendly countries. Georgia is described in the sources as a friendly country with a focus on sustainable development.

    The fourth edition of the Tbilisi Silk Road Forum, held in Tbilisi in 2023, also saw the participation of Saudi officials and a delegation of dignitaries, aiming to strengthen partnerships with international partners, including Georgia.

    01
    بيت لا يطرق فيه باب

    Sudan Conflict: Two Years of War and Humanitarian Crisis

    The Sudan conflict is approaching its second year since it began on April 15, 2023, between the army and the Rapid Support Forces. This conflict has resulted in a devastating human cost, with tens of thousands killed and over 12 million people displaced, leading to a worsening humanitarian crisis.

    01
    ترمب: سأوقع أمراً تنفيذياً لإبقاء «تيك توك» قيد التشغيل لـ 75 يوماً إضافية

    Saudi Stock Market Attractiveness and Capital Migration

    Based on the sources, the Saudi stock market is viewed as increasingly attractive.

    Specifically, Dr. Ali bin Mohammed Al-Hazmi states that Saudi stock markets are considered enticing and in a good position. He also anticipates a potential migration of global capital from American financial markets to the Saudi stock market. This expected inflow of capital to the local stock market is linked to the application of new customs tariffs.

    Dr. Al-Hazmi suggests that diversifying the Saudi economy opens up opportunities and reduces risks, which could contribute to the attractiveness of its financial markets.

    The sources also mention that a recent trend shows a migration of capital from American financial markets to global markets, which is described as a complex phenomenon with economic and political dimensions. Factors contributing to this include global economic changes, monetary policies, and geopolitical tensions. This capital migration is not just a movement of funds but also reflects changing confidence in American markets and evolving investor preferences.

    In this context, Dr. Al-Hazmi advises that decision-makers and investors should deal with the capital migration phenomenon cautiously, understand the real reasons behind it, and develop appropriate strategies to maintain financial and economic stability in the United States. However, from a Saudi perspective, this migration could signify a positive outlook for the local stock market.

    01
    الألكسو» تدعو إلى حماية المخطوطات العربية وحفظها ورقمنتها

    South Lebanon: Diplomacy, Security, and Resolution 1701

    Based on the sources, the situation in South Lebanon is a topic of ongoing discussion and concern, involving multiple actors and international resolutions.

    Key aspects of the South Lebanon situation, as highlighted in the sources, include:

    • Diplomatic Engagement: Meetings have taken place between high-ranking Lebanese officials, including President Michel Aoun and Prime Minister Najib Mikati, and Morgan Ortagus, the US envoy’s deputy for the Middle East. These meetings were described as “constructive” and “positive”, focusing on the situation in South Lebanon and other issues.
    • UN Resolution 1701: Discussions have revolved around the implementation of UN Security Council Resolution 1701, which ended the 2006 war between Israel and Hezbollah. This includes the withdrawal of Israeli forces from Lebanese territory and the cessation of hostilities. The Lebanese army is reportedly taking measures to implement this resolution and extend state authority over all Lebanese territories, including the south, aiming to confine arms to the state.
    • Security Concerns: The sources mention ongoing Israeli raids in southern and eastern Lebanon. Furthermore, a recent Israeli air strike in South Lebanon resulted in the death of a Hamas official along with his family. The Lebanese National News Agency reported that the strike was carried out by an “enemy drone” targeting an apartment in Sidon.
    • Border Control: Discussions between Lebanese Prime Minister Najib Mikati and Morgan Ortagus also emphasized the need to control the border with Syria to prevent chaos, tensions, and smuggling.
    • Hezbollah’s Role: The situation is complicated by the significant influence of Hezbollah in Lebanese affairs, and there is an ongoing debate about disarming the group. The new head of Lebanon’s central bank, Said, has identified combating money laundering and the financing of terrorism as top priorities, amid concerns about Hezbollah’s financial activities and the US Treasury’s sanctions on its financial institution, Al-Qard Al-Hassan. Said has stated that any financial activities by Hezbollah outside the legal framework are unlawful and will be prevented.
    • Ceasefire Agreement: These events are occurring despite a ceasefire agreement that has been in place since November 27th.
    • Lebanese Economic Situation: The context of these discussions includes Lebanon’s efforts to be removed from the FATF “grey list” and the ongoing repercussions of a severe financial crisis that began in 2019.

    In summary, the situation in South Lebanon is characterized by ongoing diplomatic efforts, particularly involving the US, focused on maintaining stability and implementing UN Resolution 1701. However, the situation remains tense due to continued Israeli military activity, the significant presence and influence of Hezbollah, and the complex internal political and economic challenges facing Lebanon.

    01
    دايم السيف”… الإرث والثراء الخالد

    Saudi Arabia: Humanitarian Aid Under King Salman

    While the sources don’t explicitly discuss an entity or program named “King Salman Relief,” they do provide insights into Saudi Arabia’s commitment to humanitarian aid, charitable activities, and support for those in need, which can be understood as reflecting the values and directives under the leadership of King Salman.

    Several instances in the sources highlight this commitment:

    • During Ramadan, a significant emphasis is placed on providing aid to those fasting. The distribution of Iftar meals near the Grand Mosque in Mecca is mentioned. This demonstrates a dedication to supporting pilgrims and the needy during a holy time.
    • The sources show Saudi Arabia’s concern for humanitarian crises in the region, as evidenced by the strong condemnation of Israeli actions in the Palestinian territories and Syria, including the targeting of civilians and shelters. The kingdom also stressed the importance of international accountability for these violations.
    • The Palestinian Red Crescent Society’s efforts to provide mobile health clinics, online learning, and other services to the displaced are noted. While not directly attributed to “King Salman Relief,” it indicates a broader regional effort in humanitarian aid.
    • The sources mention the role of charitable institutions in achieving national development needs and building the capabilities of individuals and societies, suggesting a structured approach to aid and development within the Kingdom.
    • The general atmosphere of charity and giving during the Eid celebrations is also indicated.

    Furthermore, the emphasis on providing the best services for pilgrims at the holy sites underscores a commitment to the well-being of those visiting Saudi Arabia for religious purposes.

    In summary, while the specific term “King Salman Relief” isn’t used in the provided sources, the content strongly suggests a continuous effort by Saudi Arabia, under its leadership, towards humanitarian aid, charitable giving, and supporting vulnerable populations both domestically and in the wider region. These actions align with the principles of relief and assistance that would be expected under a leadership focused on humanitarian values.

    01
    بدور القاسمي: “الكتب تلعب دوراً مركزياً في تحقيق الوحدة والتقدم وتعزيز التفاهم بين الثقافات

    Main Headings

    • ولي العهد والرئيس الإيراني يبحثان تطورات الأحداث في المنطقة The Crown Prince and the Iranian President discuss developments in the region.
    • المملكة تدين التصعيد الإسرائيلي في الأراضي الفلسطينية وسورية The Kingdom condemns the Israeli escalation in the Palestinian territories and Syria.
    • السفير آل الشيخ : المملكة وجورجيا تعززان الشراكة والاستثمار Ambassador Al-Sheikh: The Kingdom and Georgia are strengthening partnership and investment.
    • عون وسلام يبحثان مع أورتاغوس الوضع في جنوبي لبنان Aoun and Salam discuss the situation in southern Lebanon with Ortagus
    • الرسوم الأميركية» ترفع جاذبية سوق الأسهم السعودية US tariffs increase the attractiveness of the Saudi stock market
    • حرب السودان تقترب من إتمام عامها الثاني Sudan’s war nears its second year

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • After my divorce at 40, struggled everything alone. The loneliness of everyday.

    After my divorce at 40, struggled everything alone. The loneliness of everyday.

    Nothing prepares you for the silence that follows a sudden loss. One moment, you are part of a shared life, with routines, conversations, and laughter filling the air. The next, you are alone—left to navigate a world that feels both familiar and alien. Divorce at 40 is not just about signing legal papers; it is about confronting the deep void in your daily existence. The loneliness is not always dramatic; sometimes, it is the quiet hum of an empty house or the absence of a simple goodnight text that stings the most.

    When my partner left and asked for a divorce, I was blindsided. It felt as though my entire world had crumbled in an instant. I had built a life around shared responsibilities, mutual dreams, and the comfort of companionship. Suddenly, I found myself staring at a future I never planned for—one where I had to figure out everything on my own. From the mundane tasks of grocery shopping to the weightier burdens of financial stability, I was thrust into an unfamiliar reality where loneliness became my closest companion.

    But this is not just a story of loss; it is also one of rebuilding. In the aftermath of heartbreak, I realized that independence is not just about survival—it is about rediscovering myself outside of my past relationship. The journey has been painful, but it has also been enlightening. Through leaning on friends, embracing solitude, and slowly reconstructing my identity, I am learning that while divorce is an end, it is also an opportunity for a new beginning.


    1 – My partner suddenly left me and asked for a divorce.

    There is a certain security that comes with a long-term relationship—the belief that no matter what happens, you will face it together. When my partner left unexpectedly, that illusion shattered. I was left questioning everything: Was it something I did? Could I have prevented this? The abruptness of it all was the most devastating part. One day, we were making weekend plans; the next, I was alone, trying to piece together the fragments of my old life. Psychologists often describe sudden separation as a form of psychological trauma, akin to grief, because it involves the loss of a loved one—except, in this case, they chose to leave.

    In her book Runaway Husbands: The Abandoned Wife’s Guide to Recovery and Renewal, Vikki Stark explores the profound emotional shock of unexpected divorce. She describes it as a “betrayal trauma,” where the brain struggles to process the abrupt departure of a partner. That was exactly how I felt—like I had been emotionally ambushed. The pain was overwhelming, but with time, I began to understand that the end of my marriage did not define my worth. I could either let it break me or use it as fuel to rebuild a stronger, more independent version of myself.


    2 – I struggled to handle everyday activities alone — like grocery shopping and finances.

    It is the small, everyday responsibilities that make loneliness truly sink in. Grocery shopping used to be a shared task—debating over brands, splitting the cart, planning meals together. Now, it felt like a reminder of what I had lost. Every aisle held memories, from the way we used to laugh over impulse purchases to the quiet moments of decision-making. It wasn’t just about food; it was about the presence that was missing. Simple tasks that once felt effortless became daunting when I had to do them alone.

    Finances were another overwhelming hurdle. I had relied on my partner to handle most of the bills, investments, and budgeting, and now, I was staring at spreadsheets and account statements, trying to make sense of it all. As financial expert Suze Orman states, “Owning your financial future is the most powerful thing you can do for yourself.” It took time, research, and a lot of mistakes, but I slowly started to take control. Learning to manage money was not just about survival—it was about reclaiming my independence.


    3 – I am working on my independence and now lean on my friends for support.

    In the wake of my divorce, I initially thought I had to do everything alone. I equated independence with isolation, assuming that asking for help was a sign of weakness. But I soon realized that independence is not about rejecting support—it is about choosing the right people to lean on. My friends became my lifeline, stepping in with encouragement, advice, and a simple presence that reminded me I was not alone.

    According to Brené Brown, author of The Gifts of Imperfection, true strength comes from vulnerability. She writes, “We don’t have to do all of it alone. We were never meant to.” This lesson reshaped my healing process. I no longer felt ashamed of reaching out for help, whether it was for emotional support or practical advice. My friends did not just fill the void left by my ex-partner; they helped me see that my life was still full of love, laughter, and meaning.


    4 – I’m alone on my most painful days.

    No matter how strong my support system is, there are moments of loneliness that no one else can fill. Birthdays, anniversaries, holidays—these days come with a hollow ache, a reminder of what used to be. Grief does not operate on a schedule; it sneaks up in unexpected ways. A song on the radio, an inside joke only we understood, a familiar scent—all of these can trigger an emotional landslide.

    Psychologist Judith Sills, in The Comfort Trap, explains that solitude can be both a curse and a gift. While painful, it also forces us to confront our emotions, process our loss, and grow from it. Instead of drowning in sadness, I started using these lonely moments as a time for self-reflection. I began journaling, meditating, and rediscovering hobbies I had set aside. Loneliness, when embraced, became a stepping stone toward healing.


    5 – The financial burden is all on me now.

    One of the harshest realities of divorce is financial instability. What was once a shared responsibility suddenly became mine alone. The weight of mortgage payments, utility bills, and daily expenses felt suffocating. I had to reevaluate my lifestyle, cut unnecessary costs, and rethink my financial goals. It was terrifying, but it was also an eye-opening experience that forced me to take control of my future.

    Experts like Jean Chatzky, author of Women with Money, emphasize the importance of financial literacy, especially for women post-divorce. She states, “Taking charge of your money is taking charge of your life.” I started educating myself—reading books, attending financial planning workshops, and seeking advice from professionals. Slowly, I went from feeling powerless to feeling empowered.


    6 – The small, daily moments are the hardest.

    It is not the grand occasions that hurt the most; it is the tiny, everyday moments. Making coffee in the morning without someone to share it with. Coming home to an empty house. Cooking for one. These small, seemingly insignificant rituals once carried warmth, but now they serve as quiet reminders of solitude.

    In The Unexpected Joy of Being Single, Catherine Gray highlights that embracing solitude is key to rediscovering oneself. She writes, “Being alone doesn’t mean being lonely. It means you are enough as you are.” I started focusing on self-care, turning these moments into acts of self-love rather than reminders of loss. My morning coffee became a time for reflection, my solo dinners turned into a chance to explore new recipes, and my evenings became a sanctuary rather than a void.


    7 – I’m rebuilding my life without my partner.

    The process of rebuilding after divorce is neither quick nor linear. It is a journey filled with setbacks, revelations, and moments of unexpected joy. In the beginning, I saw my future as a blank, terrifying slate. But over time, I started to view it as a canvas—one I could paint however I wanted.

    Elizabeth Gilbert, in Eat, Pray, Love, describes reinvention after heartbreak as an opportunity to “build the life you truly want.” That is what I am doing now. I am redefining what happiness looks like, setting new goals, and discovering strengths I never knew I had. My past relationship was a chapter, but it is not my whole story. My future belongs to me.


    Conclusion

    Divorce at 40 shattered my world, but it also forced me to rebuild it in a way that was uniquely mine. The loneliness, the financial struggles, and the daily adjustments were painful, but they also taught me resilience. I have learned that independence does not mean facing everything alone—it means creating a life that is fulfilling on my own terms. While the journey is far from over, I now know that I am strong enough to walk it.

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Ways to Make Money on Fiverr: Top Gigs for Success

    Ways to Make Money on Fiverr: Top Gigs for Success

    In today’s digital economy, freelancing platforms like Fiverr have revolutionized the way people earn money online. Whether you’re a writer, designer, marketer, or virtual assistant, Fiverr offers endless opportunities to monetize your skills. But with millions of gigs competing for attention, how do you stand out and ensure success?

    The key lies in choosing the right high-demand gigs and optimizing your profile for maximum visibility. From content writing to social media management, some niches consistently outperform others in terms of profitability and client demand. By focusing on these areas, you can turn your expertise into a steady income stream.

    As entrepreneur Gary Vaynerchuk once said, “Skills are cheap, passion is priceless.” The most successful Fiverr sellers don’t just offer services—they solve problems, deliver exceptional value, and build lasting client relationships. This guide will walk you through the top gigs for success on Fiverr, along with actionable strategies to help you thrive in the competitive freelance marketplace.


    1- Understanding Fiverr

    Fiverr has evolved from a small gig-based platform into a global marketplace where freelancers offer services ranging from digital marketing to website development. Unlike traditional job platforms, Fiverr operates on a buyer-request model, where clients browse seller profiles and purchase pre-packaged services (gigs). This structure allows freelancers to set their own prices, define service tiers, and showcase their expertise creatively.

    To succeed on Fiverr, it’s crucial to understand its algorithm and ranking factors. Gigs that receive consistent orders, high ratings, and quick responses rank higher in search results. As marketing expert Neil Patel notes, “Visibility is currency in the digital world.” By optimizing gig descriptions, using relevant keywords, and delivering outstanding work, freelancers can significantly boost their earnings. For deeper insights, consider reading “Freelance Like a Pro” by Robert Bly, which offers valuable strategies for thriving on platforms like Fiverr.


    2- How to Create a Fiverr Profile That Stands Out

    Your Fiverr profile is your digital storefront—it needs to impress potential buyers within seconds. Start with a professional profile picture, a compelling bio, and a clear description of your expertise. Highlight your unique selling proposition (USP) to differentiate yourself from competitors. For example, instead of saying “I write articles,” say “I craft SEO-optimized blog posts that drive traffic and conversions.”

    Additionally, leverage Fiverr’s gig extras to upsell services and increase revenue. Offering fast delivery, additional revisions, or premium packages can significantly boost your earnings. As branding expert Seth Godin puts it, “People do not buy goods and services. They buy relations, stories, and magic.” A well-optimized profile tells a story of professionalism and reliability, encouraging clients to choose you over others. For further guidance, “The Freelancer’s Bible” by Sara Horowitz provides excellent tips on building a standout freelance presence.

    3- Content Writing

    The demand for high-quality content writing on Fiverr is skyrocketing, with businesses constantly needing blog posts, articles, and web copy. Successful sellers specialize in SEO-optimized content, engaging storytelling, and industry-specific expertise. Whether it’s tech reviews, health guides, or finance articles, mastering a niche can set you apart. As content strategist Ann Handley says, “Quality content is not just king—it’s the kingdom.”

    To thrive as a Fiverr content writer, focus on delivering value beyond words. Research thoroughly, incorporate data-driven insights, and structure content for readability. Offering packages that include keyword research or content strategy can attract higher-paying clients. For those looking to refine their craft, “Everybody Writes” by Ann Handley is an essential read for mastering persuasive and effective writing.


    4- Virtual Assistant

    The virtual assistant (VA) gig is one of the most versatile on Fiverr, covering tasks like email management, scheduling, and customer support. Businesses and entrepreneurs outsource these tasks to save time, making it a lucrative opportunity for organized freelancers. As productivity expert Tim Ferriss notes, “Focus on being productive instead of busy.” A skilled VA helps clients achieve exactly that.

    To succeed, highlight your expertise in tools like Trello, Slack, or Google Workspace. Offering specialized services—such as social media coordination or CRM management—can justify premium pricing. Building long-term client relationships is key, as repeat business is common in this field. For deeper insights, “The 4-Hour Workweek” by Tim Ferriss provides valuable strategies on remote work efficiency.


    5- Graphic Design

    From logos to social media graphics, graphic design remains a top-performing Fiverr gig. Clients seek visually striking designs that enhance branding and engagement. As design legend Paul Rand famously said, “Design is the silent ambassador of your brand.” A strong portfolio showcasing diverse styles (minimalist, vintage, modern) can attract a wide range of buyers.

    To stand out, offer quick turnaround times and multiple design concepts. Including add-ons like vector files or brand guidelines can increase order value. Staying updated with trends (e.g., 3D design, motion graphics) ensures competitiveness. For aspiring designers, “Steal Like an Artist” by Austin Kleon offers creative inspiration and practical advice.


    6- Digital Marketing

    Businesses increasingly rely on freelancers for digital marketing services like SEO, PPC, and email campaigns. Fiverr sellers who demonstrate measurable results (e.g., “Increased client traffic by 200%”) gain trust quickly. Marketing guru Philip Kotler emphasizes, “Marketing is no longer about the stuff you make, but the stories you tell.”

    Specializing in a sub-niche—such as Instagram ads or Google Analytics audits—can help you command higher rates. Offering free strategy consultations as a gig extra can also convert more buyers. For advanced techniques, “Contagious: Why Things Catch On” by Jonah Berger explores the psychology behind viral marketing.


    7- Bookkeeping

    Small businesses and startups often outsource bookkeeping to Fiverr freelancers proficient in QuickBooks, Xero, or Excel. Accuracy and confidentiality are critical here. As investor Warren Buffett advises, “Accounting is the language of business.” Those who simplify financial tracking for clients build lasting partnerships.

    Highlighting certifications (e.g., CPA or ACCA) boosts credibility. Offering monthly retainer packages ensures steady income. For freelancers seeking to expand their expertise, “Profit First” by Mike Michalowicz provides innovative financial management strategies.


    8- Proofreading

    In a world flooded with content, proofreading gigs are in high demand. Writers, students, and businesses need error-free documents. Grammar stickler Lynne Truss quips, “Proper punctuation is both the sign and the cause of clear thinking.” Precision and a keen eye for detail are non-negotiable in this field.

    To attract premium clients, specialize in academic, legal, or technical proofreading. Offering 24-hour delivery or annotated feedback can justify higher prices. “The Elements of Style” by Strunk and White remains the gold standard for mastering grammar rules.


    9- Copywriting

    Unlike content writing, copywriting focuses on persuasion—crafting sales pages, ads, and product descriptions that convert. Legendary copywriter David Ogilvy believed, “Good copy can’t be written with tongue in cheek, written just for a living. You’ve got to believe in the product.” Successful Fiverr sellers blend creativity with data-driven techniques.

    Showcasing conversion rate improvements (e.g., “Boosted client sales by 30%”) builds trust. Offering A/B testing as a gig extra adds value. For mastery, “The Copywriter’s Handbook” by Robert Bly is indispensable.


    10- Transcription

    With podcasts, interviews, and webinars booming, transcription services are thriving. Fast, accurate typists can monetize this skill easily. As media expert Jay Baer notes, “Content is fire; social media is gasoline.” Transcribers help repurpose audio into shareable text.

    Offering verbatim vs. clean transcriptions caters to diverse needs. Multilingual transcription expands your market. “The Transcriptionist’s Guide” by Janet Shaughnessy offers practical tips for efficiency.


    11- Data Entry

    Though competitive, data entry gigs succeed when sellers emphasize speed, accuracy, and niche expertise (e.g., medical or legal data). Tech entrepreneur Elon Musk advises, “Focus on signal over noise.” Efficient data organizers help businesses streamline operations.

    Automation tools (e.g., Zapier) can be a selling point. Bulk discounts encourage repeat orders.


    12- Social Media Management

    Brands seek Fiverr freelancers to curate content, schedule posts, and engage audiences. Social media guru Gary Vaynerchuk stresses, “Content is king, but context is God.” Tailoring strategies to platform algorithms (e.g., Instagram Reels, LinkedIn articles) is crucial.

    Offering analytics reports or influencer outreach as add-ons enhances value. “Jab, Jab, Jab, Right Hook” by Vaynerchuk delves into platform-specific tactics.


    13- Photography

    Stock photos, product shots, and event photography sell well on Fiverr. Iconic photographer Ansel Adams said, “You don’t take a photograph, you make it.” Unique angles and professional editing set top sellers apart.

    Packages with multiple edits or commercial licenses increase profitability. “Understanding Exposure” by Bryan Peterson is a must-read for technical mastery.


    14- Photo or Video Editing

    With visual content dominating, editing gigs (e.g., Lightroom presets, YouTube cuts) are highly lucrative. Filmmaker Martin Scorsese asserts, “Cinema is a matter of what’s in the frame and what’s out.” Clean, dynamic edits keep clients coming back.

    Before/after sliders in your portfolio showcase skills. Offering 24-hour express edits appeals to urgent buyers.


    15- Editing

    Distinct from proofreading, editing involves refining structure, tone, and flow. Author Stephen King warns, “To write is human, to edit is divine.” Developmental editing for manuscripts or scripts commands premium rates.

    Samples with tracked changes demonstrate your process. “On Writing” by Stephen King blends editing wisdom with writing advice.


    16- Website Development

    From WordPress to Shopify, web development gigs cater to businesses needing functional, sleek sites. Tech visionary Steve Jobs declared, “Design is not just what it looks like—it’s how it works.” Responsive, fast-loading sites win referrals.

    Highlighting SEO integration or post-launch support adds value. “Don’t Make Me Think” by Steve Krug covers user-friendly design principles.


    17- Business Formation and Growth

    Entrepreneurs seek Fiverr sellers for LLC registration, business plans, or pitch decks. Investor Mark Cuban advises, “It’s not about ideas. It’s about making ideas happen.” Templates and compliance guidance streamline startups.

    Bundling services (e.g., trademark filing + branding) creates upsell opportunities. “The Lean Startup” by Eric Ries is pivotal for growth strategies.


    18- Alternative Freelancing Platforms

    While Fiverr excels, diversifying to Upwork, Toptal, or PeoplePerHour mitigates risk. Economist Milton Friedman noted, “The only relevant test of the validity of a hypothesis is comparison of prediction with experience.” Testing platforms maximizes income streams.

    Compare fee structures and niche demands. “The Gig Economy” by Diane Mulcahy explores freelance ecosystem trends.


    19- Top Fiverr Jobs Wrapup

    The most successful Fiverr sellers nich down, deliver consistently, and adapt to trends. Management guru Peter Drucker observed, “The best way to predict the future is to create it.” Continuous learning and client feedback fuel growth.

    Track best-performing gigs monthly and refine offerings. “Deep Work” by Cal Newport teaches focus techniques for freelancers.


    Conclusion

    Fiverr’s marketplace rewards specialization, professionalism, and agility. Whether you’re a writer, designer, or marketer, aligning your gigs with market demand and client pain points ensures sustainable success. Remember, freelancing isn’t just about skills—it’s about problem-solving and building trust.

    As you embark on your Fiverr journey, keep iterating based on data and feedback. For further inspiration, explore “Atomic Habits” by James Clear to master the small wins that compound into long-term success. The digital economy is ripe with opportunity—your next gig could be the start of something extraordinary.

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • SQL Full Course for Beginners (30 Hours) – From Zero to Hero

    SQL Full Course for Beginners (30 Hours) – From Zero to Hero

    YouTube Video

    SQL Full Course for Beginners (30 Hours) – From Zero to Hero

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • Analyzing Restaurant Data and Movie Trends

    Analyzing Restaurant Data and Movie Trends

    “01.pdf” outlines a Jupyter Notebook project focused on analyzing a Zomato restaurant dataset. The session aims to teach data visualization techniques like bar charts, line graphs, histograms, box plots, and heatmaps to extract insights. Specific questions to be answered include identifying popular restaurant types, understanding customer ratings, analyzing order frequency based on dining options, and determining spending patterns. The initial steps cover uploading the data, importing necessary Python libraries (Pandas, NumPy, Matplotlib, Seaborn), and reading the CSV file into a Pandas DataFrame for analysis and visualization.

    The second source details a Python-based data analysis project using a Netflix movie dataset. The goal is to answer questions about movie genres, popularity, and release years by employing exploratory data analysis (EDA). The process involves importing libraries (NumPy, Pandas, Matplotlib, Seaborn), loading the data, and performing data cleaning tasks such as format conversion and handling missing/duplicate values. The project then focuses on data visualization and statistical analysis to identify popular genres, highly-rated movies, and trends in movie releases over time.

    The third source presents a Python project centered on analyzing an e-commerce dataset to understand customer behavior and sales trends. The objectives include performing data analysis and visualization, specifically monthly sales and profit. The initial steps involve setting up the environment by opening Jupyter Notebook, uploading the dataset, and importing essential Python libraries, including Pandas and the Plotly visualization library. The project intends to clean the data and then generate insightful reports through various visualizations.

    Python Project Analysis Study Guide

    Quiz

    1. According to the “Python Complete Crash Course,” what is the primary reason recruiters focus on project experience during interviews?
    2. Name at least three Python libraries mentioned in the “Python Complete Crash Course” that are commonly used for data analysis. What is the general purpose of each?
    3. In the Zomato data analysis project, what was the initial step after uploading the dataset into the Jupyter Notebook? What Python function was used for this?
    4. Explain the purpose of the user-defined function handle_rate in the Zomato project. What data transformation did it perform?
    5. Based on the Zomato project analysis, which type of restaurant (listed in the ‘listed_in(type)’ column) receives the majority of food orders? What evidence supports this conclusion?
    6. According to the Zomato project, what is the general rating range (out of 5) that the majority of restaurants receive? What visualization was used to determine this?
    7. In the Uber case study, what was the initial problem in Paris in 2008 that led to the idea for Uber?
    8. Describe the evolution of Uber’s service from its initial concept to the different types of ride-sharing options available today, as mentioned in the case study.
    9. Identify at least three ways Uber utilizes data science and analytics in its operations, according to the case study.
    10. What were the months identified in the Uber project analysis with the least number of Uber bookings? What possible reason was suggested for this trend?

    Quiz Answer Key

    1. Recruiters focus on project experience because projects demonstrate practical application of skills and the amount of work a candidate has actually done, which is more telling than just theoretical knowledge in a short interview.
    2. Pandas: Used for data manipulation and cleaning, providing data structures like DataFrames. NumPy: Used for numerical computations and mathematical operations. Matplotlib and Seaborn: Used for data visualization, creating graphs and charts.
    3. The initial step was to create a Pandas DataFrame by reading the Zomato CSV file into the Jupyter Notebook. The Python function used was pd.read_csv().
    4. The purpose of the handle_rate function was to clean the ‘rate’ column by extracting the numerical rating value as a float and removing the ‘/5’ suffix. This converted the rating into a usable numerical format.
    5. Based on the count plot visualization, the ‘Dining’ type restaurant receives the majority of food orders, as indicated by the highest bar representing the count of this category.
    6. The majority of restaurants receive ratings between 3.5 and 4 (out of 5). This was determined using a histogram visualization of the ‘rate’ column, which showed the highest frequency of ratings within this range.
    7. The initial problem in Paris in 2008 was a snowy evening with limited public transport, leading to frustration and the idea for a technology to easily book rides.
    8. Uber initially started as a ride-sharing platform where costs were divided among passengers going in the same direction. It gradually evolved to allow on-demand booking of individual rides and expanded to offer various options like UberX (affordable), Uber Pool (shared rides), Uber Black (premium), UberXL (larger groups), Uber Freight, and Uber for Businesses.
    9. Uber utilizes data science for TA estimation (arrival time prediction), price prediction, route optimization, driver-rider matching, and fraud prevention in payments.
    10. The months identified with the least number of Uber bookings were November, December, and January. The suggested reason was the cold weather and snowfall during these winter months, particularly since the data is US-based and Paris was an early international expansion location.

    Essay Format Questions

    1. Compare and contrast the objectives and methodologies of the Zomato data analysis project and the Uber case study analysis. What were the key insights gained from each, and how could these insights be valuable to the respective businesses?
    2. Discuss the importance of data cleaning and preprocessing in both the “Python Complete Crash Course” examples (Zomato and Uber/Netflix). Provide specific examples of cleaning techniques used and explain why these steps were crucial for accurate analysis.
    3. Evaluate the role of data visualization in understanding and communicating the findings of the Zomato and Uber/Netflix project analyses. Describe at least three different types of visualizations used and explain what information each visualization effectively conveyed.
    4. Analyze the business implications of the findings from either the Zomato or the Uber project. How could the identified trends and patterns (e.g., popular restaurant types, peak booking times, popular movie genres) inform strategic decision-making for the company?
    5. Reflect on the process of conducting a data analysis project as demonstrated in the provided sources. What are the key stages involved, and what skills are essential for a data professional to effectively execute such projects from data acquisition to insight generation?

    Glossary of Key Terms

    • Library (in programming): A collection of pre-written code that provides functions and tools to perform specific tasks, saving programmers from writing code from scratch. (e.g., Pandas, NumPy, Matplotlib, Seaborn, Plotly).
    • DataFrame (Pandas): A two-dimensional, tabular data structure with labeled rows and columns, similar to a spreadsheet or SQL table. It is a primary data structure in Pandas for data manipulation and analysis.
    • CSV (Comma Separated Values): A simple text file format in which values are separated by commas and each line represents a row of data.
    • Jupyter Notebook: An interactive web-based environment that allows users to create and share documents containing live code, equations, visualizations, and narrative text. It is commonly used for data analysis and exploration in Python.
    • Data Cleaning: The process of identifying and correcting errors, inconsistencies, and inaccuracies in a dataset to improve its quality for analysis. This can involve handling missing values, removing duplicates, and standardizing formats.
    • Data Preprocessing: The steps taken to transform raw data into a format suitable for analysis. This can include cleaning, transforming, integrating, and reducing data.
    • Data Visualization: The representation of data in a graphical format (e.g., charts, graphs, maps) to make it easier to understand patterns, trends, and insights.
    • User-Defined Function: A block of code defined by the programmer to perform a specific task. It can be called multiple times within a program to reuse the code.
    • API (Application Programming Interface): A set of rules and protocols that allows different software applications to communicate and exchange data with each other.
    • Data Analyst: A professional who examines data to identify trends, answer questions, and provide insights to help organizations make better decisions.
    • Data Scientist: A professional who uses scientific methods, algorithms, and systems to extract knowledge and insights from data in various forms.
    • Machine Learning: A subset of artificial intelligence that enables computers to learn from data without being explicitly programmed.
    • Algorithm: A step-by-step procedure or set of rules to solve a problem or accomplish a task.
    • Feature (in data): An individual measurable property or characteristic of a data point. In a table, features are represented by columns.
    • Insight (in data analysis): A meaningful and actionable finding or understanding derived from the analysis of data.
    • Count Plot (Seaborn): A type of bar plot that shows the counts of observations in each categorical bin.
    • Histogram: A graphical representation of the distribution of numerical data, where the data is grouped into bins and the height of each bar represents the frequency of values within that bin.
    • Box Plot (Seaborn): A standardized way of displaying the distribution of quantitative data based on five summary statistics: minimum, first quartile (Q1), median (Q2), third quartile (Q3), and maximum. It can also show outliers.
    • Density Plot (Seaborn/Distplot): A visualization that shows the probability density function of a continuous variable, providing a smooth estimate of the distribution.
    • Value Counts (Pandas Series): A method that returns a Series containing counts of unique values in a Pandas Series (a single column of a DataFrame).
    • Map Function (Pandas Series): A method used to substitute each value in a Series with another value, which can be derived from a function, dictionary, or Series.
    • Group By (Pandas DataFrame): A powerful method to group rows in a DataFrame that have the same values in one or more columns, allowing for aggregate calculations on these groups.
    • Reset Index (Pandas DataFrame): A method used to reset the index of a DataFrame to a default integer index. The old index can be kept as a new column.
    • Drop Function (Pandas DataFrame): A method used to remove rows or columns from a DataFrame based on specified labels or index.
    • Concatenation (in data manipulation): The process of joining two or more datasets (e.g., DataFrames or Series) along a particular axis.
    • Categorical Data: Data that represents categories or groups (e.g., restaurant types, movie genres).
    • Numerical Data: Quantitative data that can be measured or counted (e.g., ratings, votes, revenue).

    Briefing Document: Analysis of Provided Sources

    This document provides a summary of the main themes, important ideas, and key facts presented in the provided excerpts. Quotes from the original sources are included where appropriate to illustrate the points.

    Source 1: Excerpts from “01.pdf” (Python Complete Crash Course in Hindi | 5 Python Projects)

    Main Theme: This source is an introduction to a Python crash course focused on building five real-time projects, specifically aimed at individuals preparing for interviews in data analysis or data science roles. The emphasis is on practical implementation and building a strong portfolio of projects to showcase skills to recruiters.

    Important Ideas and Facts:

    • Course Objective: The primary goal of the course is to equip learners with practical Python skills through project-based learning, making them more confident and prepared for job interviews.
    • Quote: “The objective of creating the course is that whenever you go for an interview Are recruiters interviewing you for half an hour? I can’t ask the whole Python question. That is why they ask the most questions on your projects and your It is the projects that tell this story that how much work you do that’s why this”
    • Project-Based Learning: The course includes five “real timer” projects, implying they are designed to simulate real-world scenarios. One specific project mentioned is related to Zomato data analysis.
    • Quote: “There are five real timers inside it Projects include such as JumT”
    • Beginner-Friendly Approach: The course is designed for beginners with no prior “HiFi coding” experience, starting from the very basics and gradually advancing.
    • Quote: “Starting from the very basic level, here we will talk about things We will start with this and gradually advance The whole project will reach this level Every single line of code that is written in I have told you one line at a very basic level. explained in very simple language so that Complete all your five projects easily”
    • Focus on Implementation: The course emphasizes the practical application of Python concepts in the projects.
    • Quote: “There will be a lot of focus on implementation, whatever We are talking about all these projects”
    • Interview Preparation: The projects are designed to help learners answer interview questions effectively, as recruiters often focus on practical experience demonstrated through projects.
    • Quote: “if you complete it then you will see it in real time The idea would be that a data analyst is a How can a data scientist work inside a company? if we work with it then this whole Projects are its Notes Data Set Code file all things description box below It is already mentioned and this course Your confidence level after completing it It will definitely get a boost, so let’s get started”
    • Zomato Data Analysis Project: The excerpt details the initial steps of a Zomato data analysis project, including:
    • Understanding the context of Zomato’s business (restaurant partners, customers, delivery partners).
    • Identifying potential insights a data professional can extract (e.g., customer behavior, revenue growth, offering coupons).
    • Demonstrating the process of uploading a CSV dataset into a Jupyter Notebook.
    • Creating a new Jupyter Notebook file and naming it “Zomato Project”.
    • Adding a heading “Zomato Data Analysis Project”.
    • Importing essential Python libraries for data analysis: Pandas (as pd), NumPy (as np), Matplotlib.pyplot (as plt), and Seaborn (as sns).
    • Reading the Zomato CSV data into a Pandas DataFrame using pd.read_csv().
    • Addressing potential errors in file names (e.g., spaces).
    • Displaying the first few rows of the DataFrame using df.head() to understand the data structure (restaurant name, online order status, table booking, ratings, votes, cost for two, listed dining type).
    • Data Cleaning and Manipulation:
    • Creating a user-defined function handle_rate to extract the numerical rating from the ‘rate’ column, which initially includes “/5”.
    • Using the .apply() method with the handle_rate function to clean the ‘rate’ column and convert it to a float.
    • Data Visualization and Insight Extraction:
    • Analyzing the ‘listed_in(type)’ column to determine the most popular type of restaurant using sns.countplot(). The conclusion is that “Majority of the Restaurant Falls in Dining Category”.
    • Analyzing the ‘rate’ column using plt.hist() to understand the distribution of ratings. The conclusion is that “Majority restaurant Receive ratings from 3.5 to 4 for majority of restaurants which Ratings are between 3.5 to 4 out of four It is getting a good rating”.
    • Analyzing ‘online_order’ and ‘book_table’ using sns.countplot() to understand customer preferences for online ordering and table booking.
    • Analyzing the ‘location’ column and visualizing the number of restaurants in each location using plt.figure() and sns.countplot().
    • Analyzing the relationship between ‘approx_cost(for two people)’ and ‘listed_in(type)’ using plt.figure() and sns.barplot().

    Source 2: Excerpts from “01.pdf” (Continued – Uber Data Analysis Project)

    Main Theme: This section transitions to an Uber data analysis project, focusing on analyzing ride data to extract insights relevant to the company’s operations and customer behavior. It also connects this project to preparing for data science/analyst job interviews by simulating a take-home assignment.

    Important Ideas and Facts:

    • Interview Simulation: The project is presented as a way to prepare for the first round of data science/analyst interviews, where companies often provide case studies or assignments.
    • Quote: “If you get a call for that then this project Through which our round number one is Where the company will give you a case study How to solve the assignments she sends how do we submit it should make projects like this that we prepare ourselves for this round Was able to create potential and for this round You should be so capable that we can take out the round So these things are also included in today’s project You will get to learn how to The company provides case studies,”
    • Uber Company Overview: A brief introduction to Uber Technologies is provided, including its nature (American multinational transportation company), services (courier, food delivery, freight), headquarters (San Francisco), global presence (over 70 countries, 10,500+ cities), user base (150 million+ monthly active users, 6 million drivers), trip volume (2.8 million+ daily trips), and revenue ($37.2 billion for 2020-23).
    • Uber’s Origin Story: The excerpt recounts the founding of Uber by Camp Garrett in 2008, inspired by the difficulty of finding transportation in Paris during a snowy evening. The initial idea involved ride-sharing to divide costs, which later evolved. Travis Kalanick joined as a co-founder, bringing technological expertise. Uber launched its beta version in San Francisco in 2009, with the first booked ride in June 2010. International expansion began in 2012.
    • Uber’s Service Types: The different types of Uber ride-sharing services are mentioned: UberX (affordable), Uber Pool (shared rides), Uber Black (premium), Uber Group/UberXL (larger groups), and expansion into Uber Eats, Uber Freight, and Uber for Businesses.
    • Uber’s Revenue Model: Uber earns money through commissions on rides, subscriptions, and advertising.
    • Role of Data Science in Uber: The importance of data science in Uber’s operations is highlighted, specifically in:
    • ETA (Estimated Time of Arrival) Estimation: Using machine learning algorithms to predict arrival times.
    • Price Prediction: Using data analysis to determine ride fares.
    • Route Optimization: Algorithms are used to suggest efficient routes.
    • Matching Drivers and Riders: Data science helps in creating optimal matches.
    • Fraud Detection in Payments: Ensuring secure transactions.
    • Uber’s Data Science History: Uber started working on data science and analytics around 2010-2011, with Kevin Novak as the head of data science.
    • Uber Data Analysis Project – Data Loading and Initial Cleaning:Loading an Uber dataset into a Pandas DataFrame named data_set using pd.read_csv().
    • Handling missing values in the ‘PURPOSE*’ column by filling them with “NOT OK” using fillna().
    • Converting the ‘START_DATE*’ and ‘END_DATE*’ columns to datetime objects using pd.to_datetime() with errors=’coerce’ to handle potential invalid date formats.
    • Extracting the date and time components from the ‘START_DATE*’ column into new columns named ‘date’ and ‘time’ using pd.DatetimeIndex().
    • Categorizing the ‘time’ column into ‘Day Night’ categories (Morning, Afternoon, Evening, Night) based on specific time intervals using pd.cut().
    • Removing rows with any remaining null values using data_set.dropna(inplace=True).

    Source 3: Excerpts from “01.pdf” (Continued – Uber Data Analysis Project – Data Visualization and Analysis)

    Main Theme: This section focuses on performing data visualization and extracting insights from the cleaned Uber dataset to answer specific business-related questions.

    Important Ideas and Facts:

    • Data Visualization Setup: Setting up the environment for data visualization using Matplotlib (as plt) and Seaborn (as sns).
    • Analyzing Ride Categories and Purposes:Creating subplots using plt.figure() and plt.subplot().
    • Using sns.countplot() to visualize the distribution of rides by ‘CATEGORY’. The insight is that most Uber rides are for “Business” purposes compared to “Personal”.
    • Using sns.countplot() to visualize the distribution of rides by ‘PURPOSE’. The insights include that the most frequent purpose is “Meeting”, followed by “Meal/Entertain”, “Customer Visit”, “Errand/Supplies”, “Temporary Site”, and “Office Supplies”. Null values (labeled “NOT OK”) are also present.
    • Analyzing Ride Timing:Using sns.countplot() to visualize the distribution of rides by the created ‘Day Night’ categories. The insight is that most Uber rides are booked during the “Afternoon”, followed by “Evening”, then “Night”, and the least in the “Morning”.
    • Analyzing Monthly and Weekly Trends:Creating a ‘month’ column by extracting the month from the ‘START_DATE*’ column using pd.DatetimeIndex().month.
    • Creating a dictionary month_label to map numerical month values to month names.
    • Mapping the numerical ‘month’ column to the ‘month_label’ to get a categorical month column.
    • Using pd.DataFrame() and groupby() with count() to get the count of rides per month.
    • Creating a line plot using plt.plot() to visualize the trend of Uber rides over the months. The observation is that rides are least booked during the winter months (November, December, January).
    • Creating a ‘day’ column by extracting the day of the week from the ‘START_DATE*’ column using data_set[‘START_DATE*’].dt.weekday.
    • Creating a dictionary day_label to map numerical weekday values (0-6) to day names (Monday-Sunday).
    • Mapping the numerical ‘day’ column to the ‘day_label’ to get a categorical day column.
    • Using data_set[‘DAY*’].value_counts() to count the occurrences of each day.
    • Using sns.barplot() to visualize the number of rides booked on each day of the week. The insight is that Friday has the highest number of bookings, while Saturday and Sunday have the least.
    • Analyzing Ride Distance (Miles):Using sns.boxplot() to visualize the distribution of ride distances (‘MILES*’). The initial box plot shows a wide range of distances, with most rides concentrated at lower mileages but outliers going up to 175 miles.
    • Creating a filtered DataFrame (data_set[data_set[‘MILES*’] <= 100]) and using sns.boxplot() to focus on rides within 100 miles. This provides a clearer view of the distribution within this range.
    • Further filtering for rides less than 40 miles (data_set[data_set[‘MILES*’] < 40][‘MILES*’]) and using sns.distplot() to visualize the density distribution of these shorter rides. The insight is that most rides are within the 0-10 mile range, with a significant number up to 20 miles, indicating that people primarily use Uber for shorter distances.

    Source 4: Excerpts from “01.pdf” (Continued – Netflix Movie Data Analysis Project)

    Main Theme: This section introduces a new project focused on analyzing a Netflix movie dataset to extract insights about movie genres, popularity, and release trends. This is also framed as a potential data analysis task within a large media streaming company.

    Important Ideas and Facts:

    • Context: The project simulates working as a data professional within Netflix.
    • Netflix Company Overview: A brief overview of Netflix is provided, including its origin as a DVD rental service in 1997, its expansion into streaming in 2007, its global reach (available in over 190 countries, including India), its profitability ($2.4 billion profit), its large subscriber base (283 million+ paid memberships), and its use of data to understand customer behavior and patterns.
    • Dataset: The project involves analyzing a dataset of around 9,000-10,000 movies with information such as release date, title, overview, popularity, vote count, average vote, genre, and poster URL.
    • Analysis Questions: Five specific questions need to be answered using the dataset:
    1. Which are the genres that most people have liked (based on the number of votes)?
    2. Which is the movie that is most popular, and what is its genre?
    3. Which is the movie that has the least popular rating, and what is its genre?
    4. Which is that movie in which year were the most films made (most released)?
    5. (Implied but not explicitly numbered) Analyze the vote average column to categorize movies based on their average rating (e.g., popular, average, below average, not popular).
    • Tool: Python and Jupyter Notebook are to be used for solving the questions.
    • Data Loading: The excerpt shows importing necessary libraries (NumPy as np, Pandas as pd, Matplotlib.pyplot as plt, Seaborn as sns) and loading the movie data from a CSV file named “tmdb_5000_movies.csv” into a Pandas DataFrame named df. The lineterminator=’\n’ argument is used in pd.read_csv().

    Source 5: Excerpts from “01.pdf” (Continued – Netflix Movie Data Analysis Project – Data Exploration and Cleaning)

    Main Theme: This section details the initial steps of exploring and cleaning the Netflix movie dataset.

    Important Ideas and Facts:

    • Initial Data Exploration: Displaying the first five rows of the DataFrame using df.head() to understand the data structure (budget, genres, homepage, id, keywords, original_language, original_title, overview, popularity, production_companies, production_countries, release_date, revenue, runtime, spoken_languages, status, tagline, title, vote_average, vote_count).
    • Handling Date Format: Acknowledging the need to bring the ‘release_date’ column into datetime format, though the implementation is shown later.
    • Exploring Genres: Examining the ‘genres’ column, noting that multiple genres are listed within a single string, separated by commas and spaces (e.g., “Action, Adventure, Science Fiction”). This highlights the need for splitting and processing this column for effective analysis.
    • Checking for Duplicates: Using df.duplicated().sum() to check for duplicate rows in the dataset. The result of 0 indicates that there are no duplicate movies.
    • Basic Statistics: Using df.describe() to get descriptive statistics for numerical columns (popularity, vote_count, vote_average, budget, revenue, runtime). This provides insights into the distribution and range of these variables (e.g., average popularity, maximum votes).
    • Irrelevant Column Removal: Identifying columns that are deemed unnecessary for answering the posed questions: ‘budget’, ‘homepage’, ‘id’, ‘keywords’, ‘original_language’, ‘poster_path’, ‘production_companies’, ‘production_countries’, ‘release_date’, ‘revenue’, ‘runtime’, ‘spoken_languages’, ‘status’, ‘tagline’. These are stored in a list columns_to_remove.
    • Dropping Columns: Using df.drop() with axis=1 and inplace=True to permanently remove the identified irrelevant columns from the DataFrame.
    • Categorizing Vote Average: Creating a user-defined function categorize_vote_average to label movies based on their ‘vote_average’ into categories: ‘popular’, ‘average’, ‘below average’, and ‘not popular’. This involves calculating percentile-based thresholds (minimum, 25th percentile, 50th percentile, 75th percentile, maximum) and using pd.cut() to assign labels. The function is applied to the ‘vote_average’ column to create a new column ‘vote_category’.
    • Splitting Genres: Processing the ‘genres’ column to split the comma-separated genre strings into individual genres. This involves:
    • Using df[‘genres’].str.split(‘, ‘) to split the strings into lists of genres.
    • Using df.explode(‘genres’) to transform each list of genres into separate rows, effectively creating a long format DataFrame where each movie-genre combination has its own row.
    • Resetting the index of the resulting DataFrame df_exploded.
    • Casting the ‘genres’ column to the ‘category’ data type.
    • Unique Genre Count: Using df_exploded[‘genres’].nunique() to find the number of unique genres (resulting in 19).

    Source 6: Excerpts from “01.pdf” (Continued – Netflix Movie Data Analysis Project – Data Visualization and Analysis with Plotly)

    Main Theme: This section introduces the Plotly library for creating interactive visualizations to answer the remaining questions about the Netflix movie dataset.

    Important Ideas and Facts:

    • Introduction to Plotly: Explaining the benefits of using Plotly for dynamic and interactive visualizations, noting that it’s a valuable skill in the industry. It mentions the use of plotly.express for high-level plotting and plotly.graph_objects for more customized graphs.
    • Importing Plotly Libraries: Importing the necessary Plotly modules:
    • plotly.express as px
    • plotly.graph_objects as go
    • plotly.figure_factory as ff (commented out but mentioned)
    • plotly.subplots (implicitly used later)
    • plotly.colors
    • plotly.io as pio
    • Setting Default Theme: Setting the default Plotly template to ‘plotly_white’ using pio.templates.default = “plotly_white”.
    • Re-loading Data (Optional): Showing the re-loading of the “tmdb_5000_movies.csv” dataset into a DataFrame named data (though the previous df_exploded DataFrame with processed genres is the one primarily used for analysis).
    • Analyzing Most Frequent Genre:Using df_exploded[‘genres’].value_counts() to get the count of movies for each genre.
    • Using px.bar() to create a bar chart showing the frequency of each genre. The ‘genres’ column is on the y-axis, and the count is on the x-axis. The chart is displayed using fig.show(). The insight is that ‘Drama’ is the most frequent genre, followed by ‘Action’.
    • Analyzing Vote Average Category:Using px.bar() to create a bar chart showing the distribution of movies across the created ‘vote_category’ (popular, average, etc.). The ‘vote_category’ is on the x-axis, and the count is on the y-axis. The chart is displayed using fig.show(). The insight is that most movies fall into the ‘average’ vote category.
    • Identifying Most Popular Movie:Finding the movie with the maximum ‘popularity’ using df[df[‘popularity’] == df[‘popularity’].max()]. The most popular movie is identified as ‘Minions’ with a popularity score of approximately 875.
    • Identifying Least Popular Movies:Finding the movie(s) with the minimum ‘popularity’ using df[df[‘popularity’] == df[‘popularity’].min()]. Several movies are identified with a popularity score of 0.
    • Analyzing Movie Releases by Year:Extracting the year from the ‘release_date’ column using pd.to_datetime(df[‘release_date’]).dt.year.
    • Counting the number of movies released each year using .value_counts().
    • Using px.bar() to create a bar chart showing the number of movie releases per year. The year is on the x-axis, and the count is on the y-axis. The chart is displayed using fig.show(). The insight is that the number of movie releases generally increased over time, with a peak around 2014-2016.

    This briefing document summarizes the key aspects of the provided sources, highlighting the learning objectives, methodologies, and insights gained from the Python-based data analysis projects on Zomato, Uber, and Netflix movie data. The use of quotes and explicit mention of important code snippets and conclusions from the analysis are included to provide a comprehensive overview.

    Python, Data Analysis, and Interview Preparation

    Frequently Asked Questions based on the Provided Sources

    1. What is the primary goal of the Python Complete Crash Course in Hindi, and who is it designed for? The primary goal of the Python Complete Crash Course is to equip individuals with practical Python skills, particularly for data analysis and data science roles. It emphasizes learning through hands-on projects to build confidence and demonstrate practical abilities in interviews. The course is designed for beginners with no prior HiFi coding experience, starting from basic concepts and gradually advancing to real-time projects. It aims to help learners understand how data analysts and data scientists work within a company.

    2. Why does the Python course emphasize project-based learning, especially for interview preparation? The course focuses on project-based learning because recruiters in interviews often concentrate on candidates’ projects rather than asking exhaustive theoretical Python questions due to time constraints. Projects effectively showcase a candidate’s practical skills, the amount of work they’ve done, and their ability to apply Python in real-world scenarios. Completing projects demonstrates a tangible understanding of Python and boosts confidence for interviews.

    3. What are the key Python libraries highlighted in the Zomato Data Analysis Project, and what are their primary uses in this context? The key Python libraries highlighted are: * Pandas (as pd): Used for data manipulation and cleaning. It provides data structures like DataFrames, which are essential for reading, processing, and analyzing structured data like the Zomato CSV file. * NumPy (as np): A library for numerical computations and mathematical operations, often used in conjunction with Pandas for data analysis tasks. * Matplotlib.pyplot (as plt): A fundamental library for creating static, interactive, and animated visualizations in Python, such as plots and graphs to understand data patterns. * Seaborn (as sns): A data visualization library built on top of Matplotlib, providing a higher-level interface for creating informative and attractive statistical graphics.

    These libraries are used to import and read the Zomato dataset, clean and manipulate the data (using Pandas and NumPy), and then visualize various aspects of the data to extract insights (using Matplotlib and Seaborn).

    4. What were some of the key data cleaning and preprocessing steps performed in the Zomato Data Analysis Project? Several data cleaning and preprocessing steps were performed, including: * Importing necessary libraries: Pandas, NumPy, Matplotlib, and Seaborn were imported to handle data manipulation and visualization. * Reading the CSV file into a Pandas DataFrame: The Zomato dataset was loaded for analysis. * Handling rating data: A user-defined function was created to extract the numerical rating from the “Rate” column, which initially contained additional text. The .apply() method was used to apply this function to the entire column. * Handling missing values: The project identified and handled missing values in the “Purpose” column by replacing them with “Not OK”. Later, it demonstrated dropping rows with any null values using dropna() to ensure cleaner data for analysis. * Converting date and time formats: The “Start Date” and “End Date” columns, initially in object format, were converted to datetime objects using pd.to_datetime(). Errors in the date format were handled by setting invalid dates to “Not a Time” (NaT). * Creating new date and time-related columns: New columns for “Date” and “Time” were extracted from the “Start Date” column. * Categorizing time into day periods: A new “Day Night” column was created to categorize rides into “Morning,” “Afternoon,” “Evening,” and “Night” based on the time. * Handling duplicates: Although no duplicates were found in the Netflix movie dataset, the process of checking for duplicates using .duplicated() and .sum() was demonstrated.

    5. What were some of the key insights derived from the Zomato Data Analysis Project through data visualization? Several insights were gained through data visualization: * Restaurant Type Preferences: Dining type restaurants receive the most orders. * Rating Distribution: The majority of restaurants receive ratings between 3.5 and 4. * Booking Category and Purpose: The “Business” category has the most Uber bookings, and the primary purpose for booking is for “Meetings.” * Booking Trends by Time of Day: Most Uber rides are booked during the “Afternoon.” * Booking Trends by Month: Uber bookings are lowest during the winter months of January, February, November, and December. * Booking Trends by Day of the Week: Friday is the day with the highest number of Uber bookings, while Sunday has the fewest. * Trip Distance Analysis: Most Uber trips are within the 0 to 20-mile range, with a noticeable peak in the 5 to 10-mile range.

    6. What are the different rounds typically involved in data science/analytics job interviews, as mentioned in the sources? The sources mention that data science/analytics job interviews generally involve three to four rounds: * Round Number One (Assignment/Case Study): The company provides an assignment with problems to be solved, often a case study, which needs to be submitted within 24 to 48 hours. * Round Number Two (Technical): If shortlisted in the first round, candidates appear for a technical interview. * Round Number Three (HR/Managerial): If successful in the technical round, the final round is usually with HR or a hiring manager.

    The Zomato project aims to help candidates prepare for the first round, where they might receive a case study or assignment requiring data analysis and insight extraction.

    7. How did the idea for Uber originate, and what were the initial concepts behind it? The idea for Uber originated in Paris in 2008 with Garrett Camp on a snowy evening when public transport was scarce. Frustrated by the lack of available transportation, he conceived the idea of a technology or app that would allow people to book rides and have a driver come to their location. Initially, the concept involved ride-sharing to divide costs among passengers traveling in the same direction. However, the idea evolved to its current form where users can book a ride directly to their specific location.

    8. What role does data science play in Uber’s operations, and what are some specific applications mentioned? Data science plays a crucial role in various aspects of Uber’s operations, including: * ETA (Estimated Time of Arrival) Estimation: Machine learning algorithms analyze various factors to predict how long it will take for a driver to arrive at a user’s location. * Price Prediction: Data analysis and modeling are used to predict the cost of a ride based on factors like distance, time, demand, and traffic. * Route Optimization: Algorithms determine the most efficient routes for drivers to take passengers to their destinations. * Driver-Rider Matching: Data science helps in making optimal matches between available drivers and ride requests. * Fraud Detection: Analyzing data helps in identifying and preventing fraudulent activities related to payments and bookings.

    The sources emphasize that data science is essential for Uber to function effectively, as it enables accurate estimations, predictions, and optimizations that enhance the user experience.

    Data Visualization for Insight: A Project Analysis

    Data visualization is a key aspect of the projects discussed in the sources, playing a crucial role in understanding data and extracting meaningful insights. The sources illustrate several ways data visualization is employed:

    Tools and Libraries for Visualization:

    • The primary libraries mentioned for creating visualizations are Matplotlib and Seaborn. Seaborn (sns) is frequently used for generating various types of plots.
    • Plotly is also mentioned as a library that can be used for visualization in the context of the e-commerce project.

    Types of Visualizations and Their Purposes:

    • Count Plots: These are used to display the frequency of different categories within a dataset. In the Zomato project, a count plot is used to determine which type of restaurant (e.g., dining, cafe, buffet) has the majority of customer orders. Similarly, in the u data analysis project, count plots are used to see which category (business or personal) and for what purpose (e.g., meeting) people book rides the most.
    • Line Graphs: Line graphs are used to show trends and relationships between two variables. In the Zomato project, a line graph visualizes the number of votes received by each type of restaurant, helping to identify which restaurant types are most liked by customers. A line plot is also used in the u data analysis project to analyze the monthly booking trends.
    • Histograms: Histograms are used to display the distribution of a single numerical variable. In the Zomato project, a histogram is used to understand the distribution of ratings given by customers to different restaurants.
    • Box Plots: Box plots are useful for comparing the distribution of a numerical variable across different categories. In the Zomato project, a box plot is used to compare the ratings given for online and offline food orders.
    • Heat Maps: Heat maps are used to visualize the relationship between two categorical variables using color intensity. In the Zomato project, a heat map shows the relationship between the type of restaurant and whether orders are placed online or offline, indicating preferences.
    • Bar Graphs: Bar graphs are used to compare the values of different categories. In the u data analysis project, bar graphs (count plots, which are a type of bar graph) are intended to visualize the most frequent categories and purposes of Uber bookings. Seaborn’s catplot (categorical plot) is used to show the distribution of movie genres, where the height of the bars represents the frequency of each genre.
    • Dist Plots (Distribution Plots): These plots are used to visualize the distribution of a single variable, often combining a histogram with a kernel density estimate. In the u data analysis project, a dist plot is used to analyze the distribution of ride distances (in miles) booked by users.

    Purpose of Data Visualization:

    • Extracting Insights: The primary goal of data visualization in these projects is to extract meaningful insights from the data. By presenting data visually, patterns, trends, and relationships become easier to identify and understand.
    • Answering Questions: Visualizations are created to help answer specific questions related to the data. For example, in the Zomato project, visualizations are used to answer questions like which restaurants are ordered from the most, which restaurant types receive the most votes, and which restaurants have the highest ratings. Similarly, in the u data analysis project, visualizations help answer questions about booking categories, purposes, times, and distances.
    • Data Exploration and Analysis (EDA): Data visualization is a key component of Exploratory Data Analysis (EDA), as mentioned in the movie data project. It helps in understanding the characteristics of the data, identifying potential issues, and forming hypotheses.
    • Communication of Findings: Visualizations are a powerful way to communicate findings to others, such as recruiters or stakeholders in a company. Graphs and charts can convey complex information more effectively than tables of raw data.
    • Supporting Decision Making: The insights gained from data visualization can support better decision-making within a business context. For example, understanding which restaurant types are most popular can inform business strategies for Zomato. Similarly, understanding peak booking times for Uber can help with resource allocation.

    In summary, the sources highlight the significant role of data visualization in analyzing datasets, extracting actionable insights, answering specific business questions, and effectively communicating findings using libraries like Matplotlib and Seaborn, with Plotly also being a potential tool. Different types of visualizations are chosen based on the nature of the data and the specific questions being addressed.

    Zomato Data Analysis: Visualizing Restaurant Insights

    The Zomato data is used in a Python Complete Crash Course to illustrate how a data analyst or data scientist can work within a company. The objective of using this data is to answer specific business-related questions through data analysis, including performing visualization and extracting insights.

    According to the source, the Zomato data includes information such as:

    • Restaurant names.
    • Whether an order was placed online (yes/no).
    • Whether a table was booked (yes/no).
    • Ratings given by customers.
    • The number of votes received by a restaurant.
    • The approximate cost for two people.
    • The listed type of restaurant, such as dining, buffet, or cafe.

    The project involves several steps with the Zomato data, including data cleaning. One crucial cleaning step is converting the data type of the rating column to extract only the numerical rating and remove any extraneous text like “bye f” or “f s l f”. The source also mentions checking for missing values, and in this specific dataset, no missing values were found.

    The core of working with the Zomato data, as demonstrated in the source, is to extract insights by answering specific questions using data visualization. The source provides examples of the following visualizations created using the Zomato data and the insights derived from them:

    • A count plot is used to determine which type of restaurant receives the majority of orders, revealing that dining-type restaurants have the most orders.
    • A line graph visualizes the number of votes received by each type of restaurant, showing that dining restaurants received the most votes.
    • A histogram displays the distribution of customer ratings, indicating that the majority of restaurants receive ratings between 3.5 and 4.
    • A count plot examines the approximate cost for two people, suggesting that most couples spend around ₹00 on an average order.
    • A box plot compares ratings for online and offline orders, concluding that offline orders receive lower ratings compared to online orders.
    • A heat map visualizes the relationship between the type of restaurant and online/offline orders, indicating that dining restaurants mostly receive offline orders, while cafes see more online orders.

    These examples directly align with our previous discussion on data visualization, illustrating how different plot types are used to explore the data and answer specific questions. The Zomato project emphasizes the importance of visualization in understanding customer behavior and restaurant preferences. The insights gained from these visualizations can then be used by a company like Zomato to inform business strategies, such as offering more coupons for offline dining or focusing on improving offline dining experiences based on lower ratings.

    Zomato Data: Analysis of Restaurant Types and Preferences

    The sources discuss restaurant types primarily within the context of the Zomato data analysis project. The data includes a column specifying the listed type of restaurant, which includes categories such as dining, buffet, and cafe. The source also mentions an “other” category.

    Here’s a breakdown of the discussion around these restaurant types:

    • Categories Identified: The main restaurant types identified in the Zomato data are:
    • Dining
    • Buffet
    • Cafe
    • Other
    • Analysis through Visualization: The project uses various data visualization techniques to analyze customer behavior and preferences related to these different restaurant types:
    • A count plot reveals that dining-type restaurants receive the majority of customer orders. This indicates that, in terms of order frequency, dining establishments are the most popular among customers in the dataset.
    • A line graph showing the number of votes received by each restaurant type indicates that dining restaurants have received the most votes. This suggests that dining restaurants not only have more orders but also receive more feedback from customers, potentially signifying higher engagement or a larger customer base.
    • A heat map visualizes the relationship between the type of restaurant and whether orders are placed online or offline. This visualization shows that dining restaurants mostly receive offline orders, suggesting customers prefer to dine in at these establishments. Conversely, cafes see more online orders, implying a preference for takeaway or delivery from cafes. The behavior for buffet and “other” categories is also visualized in this manner.
    • Business Implications: The analysis of restaurant types allows for the extraction of actionable business insights:
    • Knowing that dining restaurants are the most popular in terms of orders and votes, Zomato can understand its strongest segment.
    • The finding that offline orders are more common for dining restaurants could inform strategies related to in-house dining experiences and potential partnerships with these establishments.
    • The observation that cafes have more online orders can guide strategies for optimizing online ordering and delivery services for this type of restaurant.
    • The lower ratings for offline orders compared to online orders suggest that Zomato might need to investigate and potentially work with restaurants to improve the offline dining experience.

    In summary, the analysis of restaurant types within the Zomato data, facilitated by data visualization, allows for a deeper understanding of customer preferences regarding different dining experiences and ordering methods. This information can be crucial for Zomato to make informed business decisions and tailor its services to meet customer demands effectively. This aligns with our earlier discussion about the role of data visualization in extracting meaningful insights from the Zomato data [previous turn].

    Zomato Data: Customer Rating Analysis

    Customer ratings are a significant aspect discussed in the sources, particularly within the context of the Zomato data analysis project. The Zomato data includes a column for ratings given by customers [previous turn]. The analysis of these ratings, often through data visualization, provides valuable insights into customer satisfaction and preferences.

    Here’s a breakdown of how customer ratings are discussed and analyzed:

    • Data Cleaning of Ratings: The Zomato project involves a crucial data cleaning step for the rating column. Initially, the ratings in the dataset contain extraneous text, such as “bye f” or “f s l f” appended to the numerical rating (e.g., “4.1/5”) . To use the ratings for analysis, a user-defined function is created to extract only the numerical part of the rating by splitting the string and taking the first value. This cleaned rating is then converted to a floating-point number .
    • Visualization of Rating Distribution: A histogram is used to visualize the distribution of customer ratings for restaurants in the Zomato data . This visualization helps to understand the range of ratings and the frequency of each rating. The analysis of the histogram reveals that the majority of restaurants receive ratings between 3.5 and 4 . This indicates a general level of customer satisfaction, with most ratings falling within a positive range.
    • Comparison of Online and Offline Ratings: A box plot is employed to compare the ratings given for online and offline food orders . The analysis of this box plot indicates that offline orders tend to receive lower ratings compared to online orders . This suggests potential areas for improvement in the offline dining experience or differences in customer expectations between online and offline orders.
    • Importance of Ratings for Businesses: The source emphasizes that rating is very important for businesses as it reflects how much customers like their product . Understanding customer ratings helps companies gauge satisfaction levels and identify areas where they might need to improve their offerings.
    • Categorization of Vote Averages (Movie Data – Related Concept): While not directly about Zomato ratings, the movie data project discusses a related concept of categorizing vote averages into labels like “popular,” “average,” “below average,” and “not popular” based on defined criteria . This demonstrates another way in which numerical ratings or scores can be analyzed and transformed into more easily understandable categories of customer sentiment.

    In summary, the analysis of customer ratings in the Zomato project is a key component of understanding customer feedback and preferences. Through data cleaning and visualization techniques like histograms and box plots, insights are derived about the distribution of ratings and the differences in ratings between online and offline orders. These insights are crucial for businesses to assess customer satisfaction and identify areas for potential improvement. The importance of ratings is highlighted, and a related concept of categorizing ratings is seen in the movie data project.

    Data Analysis Through Zomato and Movie Projects

    Data analysis is a crucial process discussed extensively in the provided sources, particularly through the practical examples of the Zomato data analysis project and the movie data project. It involves a series of steps aimed at extracting meaningful insights and answering specific questions from data.

    Here’s a breakdown of the key aspects of data analysis as illustrated in the sources:

    • Defining the Objective: Both projects begin with a clear objective. The Zomato project aims to understand customer behavior and restaurant preferences by answering specific questions related to order frequency, ratings, and costs. Similarly, the movie data project seeks to answer questions about movie genres, popularity, and release years. Having a clear objective guides the entire analysis process.
    • Data Collection and Understanding: The first step in data analysis is having access to the relevant data. The sources describe using a Zomato dataset containing information about restaurants, orders, ratings, etc. and a movie dataset with details like movie titles, genres, popularity, and release dates. Understanding the structure and content of the data is fundamental before proceeding with any analysis.
    • Data Cleaning and Pre-processing: This is a critical step highlighted in both projects.
    • In the Zomato project, data cleaning involves extracting the numerical rating from a string format and converting it to a usable data type [previous turn, 4]. The source also mentions checking for and finding no missing values in the initial Zomato dataset.
    • The movie data project emphasizes several pre-processing tasks, including handling missing values, changing the format of date columns, and removing potential white spaces in categorical columns. It also involves removing irrelevant columns that do not contribute to answering the research questions. Additionally, the movie project demonstrates creating labels from numerical data (vote average) to categorize movies.
    • Data cleaning and pre-processing ensure the data is accurate, consistent, and in a suitable format for analysis.
    • Exploratory Data Analysis (EDA): The movie data project explicitly mentions performing Exploratory Data Analysis (EDA). EDA involves initial investigations to summarize the main characteristics of the dataset, often using visual methods. The movie project demonstrates this by checking for duplicate values and calculating basic statistics (like mean, min, max) for numerical columns to understand their distribution.
    • Data Visualization: Both sources heavily emphasize the role of data visualization in data analysis.
    • The Zomato project uses various plot types like count plots, line graphs, histograms, box plots, and heat maps to explore relationships and distributions in the data and answer specific business questions [previous turn, 2, 5, 6, 7, 8, 9, 10, 11]. Visualizations help in understanding patterns and trends that might not be apparent from raw data alone.
    • While not explicitly detailed, the movie project also leads to answering questions, implying the use of visualization to derive those answers (e.g., identifying the most frequent genre or the year with the most movie releases would likely involve some form of aggregation and visual representation).
    • Insight Extraction and Interpretation: The ultimate goal of data analysis is to extract meaningful insights from the analyzed data. In the Zomato project, visualizations lead to conclusions such as dining restaurants being the most popular, offline orders receiving lower ratings, and most couples spending around ₹00 on average orders. These insights can then be used to inform business decisions.
    • Answering Specific Questions: Both projects are structured around answering a set of predefined questions. This highlights that data analysis is often driven by specific inquiries that need to be addressed using the available data.
    • Business Relevance: The Zomato project is explicitly framed within a business context, demonstrating how a data analyst or data scientist can work with real-world data to solve business problems. The insights gained are directly relevant to Zomato’s operations and strategies [previous turn]. The e-commerce sales analysis project excerpt further reinforces the business importance of data analysis, highlighting its role in understanding sales, profit, and customer behavior for e-commerce companies.

    In summary, data analysis, as demonstrated in the sources, is a systematic process involving defining goals, collecting and cleaning data, exploring its characteristics, visualizing patterns, extracting insights, and ultimately answering questions to support informed decision-making, particularly within a business context. The emphasis on data cleaning, visualization, and the derivation of actionable insights are recurring themes throughout the examples provided.

    Python Complete Crash Course in Hindi | 5 Python Projects

    The Original Text

    hello everyone i am swati and welcome to the All the people can benefit from this through interviews and This has happened for a job as well but with this python’s The objective of creating the course is that whenever you go for an interview Are recruiters interviewing you for half an hour? I can’t ask the whole Python question. That is why they ask the most questions on your projects and your It is the projects that tell this story that how much work you do that’s why this You can get Complete Python Crash Course There are five real timers inside it Projects include such as JumT There will be a lot of focus on implementation, whatever We are talking about all these projects When we start a project, Beginners have these questions in their mind It happens that we are very good at coding If I don’t know, can we do these projects? If you find it then definitely you have nothing to worry about You don’t need this crash course No HiFi coding required Starting from the very basic level, here we will talk about things We will start with this and gradually advance The whole project will reach this level Every single line of code that is written in I have told you one line at a very basic level. explained in very simple language so that Complete all your five projects easily If you get it then these projects which are going to happen It will be very beneficial for you because when You can do these five projects yourself. If you complete it then you will see it in real time The idea would be that a data analyst is a How can a data scientist work inside a company? if we work with it then this whole Projects are its Notes Data Set Code file all things description box below It is already mentioned and this course Your confidence level after completing it It will definitely get a boost, so let’s get started This is Python Complete Crash Course That’s alright so let’s start today’s class In today’s class when you complete your project If you complete it then your confidence level will increase This will definitely increase your confidence in yourself You will believe that yes now I have the science data The things that are analyzed should be understood today’s class is starting so we before you start zomato.in means Who supplies their food through Zomato If yes then that is from 2 lakhs onwards 26000 which is the restaurant near jomat If we have partners then we can understand that The data which is in crores is also of the customers Available for more than Rs 2 lakh and Rs 2.5 lakh Around Nearby About We can say Delivery Partners who are restaurant data If it is available then now it is available for you here The situation is that you want to enter any data in Zomato. Are you working on a driven role? The record of the data of the customers is yours Available now and as a data professional You need to extract some insights from this data Some EDF needs to perform visualization and there are some questions which are If you have to answer the questions then first First, I would like to show you that our The project is today’s class, in what way So in today’s class it will be visible in this way We will be coding each and every thing To rectify it in some way The graph you see on my screen With the help of these graphs we are will perform visualization whether it is a bar Whether it is a graph, be it a line graph or then in this way we have How to plot a histogram Insights have to be extracted in this way all the visualizations box plots all of these Visualizations you see Heat Map How to make this with data from Zomato We will learn all this in today’s class you must be coming to the point that here But we have some questions about this to help us solve the project First of all we have given Is there a restaurant or a buffet or dining? All this data is a type of restaurant we have here it’s been many times now This happens even in direct interviews Some such questions for you to solve are given specifically for your round number Like in forest mainly you ask such questions Now you will get to see it in the interview Solve these questions from this data The first question is what type of question you have to answer Restaurants do the majority of customers Which are the restaurants to order from? Which is the type of restaurant that Majority of customers order food how many votes has each type of restaurant Received from the customers now we are Talking about restaurants, there are different types Are there any restaurants, some have buffets Is there a cafe like full-fledged dining? If it is a restaurant, how many votes did you give? the customer has because look whenever someone The company comes to you, we come from Zomato we take the food and then it comes to us How many votes were given for a feedback option? How many people have told us well here We have to find out from this data what are the Ratings Now whenever we order food if yes then we give rating to Zomato that this How we liked the restaurant food If you don’t like the food out of five then give me three We gave a rating of 4.5 if we liked the food So, which are the restaurants that High ratings from the majority of customers It has been provided, you have to extract the data I have asked a question from Jomat observed that there are many couples who They order their food online How much amount do you spend on one meal So what size is it when ordering? Suppose the customers are from 00 to If you order food worth up to ₹5000000 It is possible that some people order online from Sometimes people take it offline also Which like mode has the highest ratings People give food or order it online is there in it or people go to eat If you eat in a restaurant, then this is there in it You also have to do an analysis of the six The question is which type The restaurant that has the most people Order food offline so that Jomat can make money like this Give some more good offers/coupons to the customers So that these people can get food wherever they want offline order online from where you order also start and the revenue of zomat is If he is able to grow then I have answered all these questions and the data set is given in front of you I will also tell you the data set here Let me show you this data set that we have is available But our Jupyter notebook is here We opened our Jupyter Notebook and Here I have created a new folder which is this I have created the folder, now The first thing we will do in the folder is how to upload data set then how to get the data Let’s see how to upload the set If yes, then I went here and clicked the upload button What you are seeing here is the upload We clicked on this Zomato data here I selected it and opened it and I I am uploading this data here we have this in csp format The data has been uploaded to us by Deposit Right now next we will work here I am a new folder which is new for us the file is ip by file so I am here Python 3 Our file, I will give it here I will open it and in this there is untitled now If this is a file, we would name it is zomato We named it as Zomato Project Now the first thing that we do is to we have uploaded it here and one of our Pass ip y n b cutter notebook Now first of all we have opened the notebook We give the heading here that today We are going to make that is the Zomato Data Analysis Project So I’m Writing Here is Zomato Data Analysis Project We would have written it in the proper heading format so i am writing this in a format of A heading Jupyter Notebook How do you install You have to do it, the link to the video is also below It is given in the description box How will you do the installation with that also You can come and check out the first one now work that we have to do here step number One of our main goals to make this project is to We will need some libraries nearby So first of all we will add those libraries here If you import then step one will happen We use the libraries which are imported These are going to be done in different ways We will use the libraries here the most The first one that we will have is a library here. That is Pandas now given this data set If we need to clean some data then If we want to do manipulation then for this we can use pandas Using the library NamPie Python is a library that provides numerical If it is useful for mathematical operations then We’re using measurement here Matt Plot Lip and Sea Bon Jo Visualizations I I was showing you so many graphs Here is the matte plot lip and seaborn If you make it with the help of the library, then every I learned what a library does. Now we have explained to you that every library what will we do here, we will import it so that All these files are in our Jupyter Notebook what should happen to all the libraries Once activated, import Panda SPD Now look Panda S PD that’s why I wrote Because panda panda is such a big word, we every If you cannot write the place then give an abbreviation for it A short form has been created PD i.e. Panda, we are with everyone’s abbreviation People will import the library just like that import measurement do not write measurement again and again so we write it as NP After this, we will import it here. matte plot lip so i’m writing here Import Matte Plot Lip pie plot s flipped by this name and then We will import C bonds I am writing here important business what have we done with all these libraries Imported successfully now libraries So now we have reached step number two. It will happen that we have the right to this data We have the data of Zomato CSP what are we supposed to do with this data If you want to bring it in this notebook then data frame Read what to do on this We will have to create data frame so I will write the steps here Number two we will create the data frame now The data of that Zomat should be transferred to this In this file in Jupyter Notebook, we have We will bring you here for this, most of the people here First, what I’m doing is creating a data frame I’m creating a variable named this Inside PD, PD means Panda library PD dot head I will do it here pdi d Reed I’ll pay here because now we have to What should we do with this data that we have? It is available, if I want to read this data then I I will write on this page read under CSV why i wrote csv because the file The format is in CSV format now what is the name of this data that we have So the name of this data is Zomato we have a file with this name data.csv If it was close we would have run it here so it is showing certain error here The error is because jomat is after that space is dot csv so here we People should slightly modify the name of the file as it This is the name of the file, write it here let’s run it now alright so Now this error is gone because the file name Now it is okay, now we will do it here We print it and enter the data here Now if I print the frame then In this way the data comes to us now what should I do as I am Here, if I call data frame then this The data has reached us properly So what we’ve done so far are two things. I have learned to do this project I have imported the libraries I need and This data was available to us. We have our own Jupyter Notebook here We have already read this data Now that we have the data, we can Now we will start working with the data First, look at the data carefully The name given means that the restaurant This is the name given to all these restaurants There are 147 of your restaurants in this data which It is included now if you order online If you have ordered online then yes or no means If someone has ordered offline then no How many people have booked the table here? I have booked a table and eaten here Its record is given how many ratings it has given After eating food from your choice menu, this You have ratings, how many votes you have cast This is available and enough to feed two people It costs, here’s how much it costs and the listed type of restaurant What type of dining does the buffet serve? What does the cafe serve and what type is it? We have this data available here Right now look, first of all we have to understand two things We learned how to create this data frame and we have libraries here I have imported it, till here everything is clear If yes, then let me know in the comments If you have any doubt then ask in the comments Now what will be our next task here? The next task is to use this data What we have to do is first see the questions Let us take a look at what needs to be solved first The first question to be solved is which This is such a restaurant which attracts maximum people what type of food do you order from the restaurant so now what are we here for We will do this thing to solve this question We will solve it but before that we will give you some data Professional, it is your job to ensure that this data Is there any missing value in Is this data clean? Is this data accurate? There are no such outsiders in these to find out everything so that we can use this data Let us be sure that yes, what we have We have provided the best data we took everything out and then If we can solve the questions then we will The steps that we are doing are data Cleaning Now the first thing that we need to do here You should see the ratings, see in which order It is 4.1 or 5 so now what is this, look at it in everyone bye f bye f bye is written so This is something that is there for us somewhere The hurdle will create so what do we want These are the ones who sleep under everyone like boyfriend it can be seen written f s l f We want to remove the rating as it is If someone gave 4.1 then it is just 4.1 and this is It is written in the denominator that this thing should be removed So now what is this step for us here? If you want to perform then now whatever step you have to take We are going to perform in this what do we need to do is to convert Convert the Data type of which column rating column so Column Name hey off column rate okay what do we need it for in this we want that only and Only the ratings given by the customers If 4.5 is given then 4.5 should come out like here 4.1 So we want 4.1 to come or slf If what is written is removed then this thing will be considered the most important First we clean the data, now its what do I need to do for this then I I am writing the code here, please pay some attention to it see i wrote here deaf most First we are creating a user defined function whenever we call a user defined function let’s create user def function means this There is a function like this, look here I am If I am writing print again and again then this print is already built in by python it’s inbuilt inside us we’re just picking it up and using it again and again so If I need to print something again and again then you don’t need to write any function yourself But user defined function means this it happens that we have the advantage that a This time I wrote a code for the user Now whenever I get this inside the defined function I would like to use it if I can Here, we are calling a user defined function will create this user defined function We will give it a name, let’s suppose it handles rate handle rate rate mean rating and its Inside here, we pass in the arguments Let me explain the value to you a little bit now please be patient this code is one by one line of code Don’t be worried if I explain it to you now The string we have inside value The value is I will write the whole code first After that, every line I will tell you Don’t be afraid at all as I keep explaining. I will explain one thing to you from the basic level itself. After this, we will write the value here. is equals to The value of zero and then we are going to Right Here Return float value return float The value is up to here, we can run it and see yes alright no errors yet now In this I will write one more line data frame The name of the data we have is data frame Inside that there is a rate column, inside this we People will put equals to two minutes, just be patient Take it, I am explaining what I am writing I want to write the code first Then I will explain to you that every What is the meaning of the line, we are inside it will apply dot apply handle handle rate Ok, now by running the code we have written Let’s see, now I am explaining this line by line. look at what i wrote now if you Here you will see directly what we need was that the direct floating point number which is If it is 4.1 then directly 4.1 will come, which is slf if now he goes away before everybody else we will see how it was coming earlier It was 4.1 5/5 Look, this thing was there in everyone now The code for this has been removed from here I have written about it, now I will tell you every single Let me explain the meaning of the line first Created a user defined function here We named it R and kept handle rate inside it I passed a value now here it is The value you are seeing is equals to string now here string is we know that this data Given the type we have the string type If there is data then we have written the string here value dot split means split function what does that do in the string like if you Anything you want like here it was written 4.15 So if you want to cut from slf We don’t need this thing from here If you want to split it then here it is The split function helps in 4.1 You are separated, now what do we need If we only want 4.1 then what value did we write is equals to value row means row position Your 4.1 was available and you can return it gave this value now what did this thing do We have collected the entire rate which we have. We had this column named this rate We need to implement this in the column of So what did we do here that this thing called rate We have columns inside this data frame what is the name of the columns we have in data frame Inside this we have the column name there is a rate so I have written the rate here inside it What did I do by applying this handle applied the rate function so that We should not do this thing again and again read and if it gets easy then this function we wrote and then look after writing The things we wanted were direct from here The values ​​we get here Now what else do we want Now we need to check that the data set is Is there any missing value in this Is there any value null that every whether the value is proper or not is something we People will now check their data cleaning What should I do for this inside the step I will write a summary of this thing, if you check the full If you want to do it then we write it for this frame d if now understand this info from function name I am coming that he will give the information so now we People can see here what we have Total columns are six columns here six seven Columns are available Name object inside it Means the name is obviously a string Type of data is online order yes no This is also string type data booked is it a table yes no then this is also a string This is the type of data, now this rating was 4.1 3.5 It comes to us floating point The data shows how many people voted This is a type of food for two people What is the approximate cost? This is also an integer and the listed type is Hotel Dining what type of cafe is it so this Object type is done, now here you If you look here it is written no null This means that all the values ​​in this data set is available no value is missing Here, this thing has become clear to us now Now we are sure about this thing So let’s give the data we have collected to ourselves The correct data is available now, the first question whatever it is this is our question that we What should we do about that restaurant? I want to find out which majority customer If you order food then now we do it for you People write this as the first thing here These are the types of restaurants that we know If you want to take it out here then I will write it here I will give you the type of restaurant first We are going to solve the question Now how do I get this thing to show me So I want to show it to you here After making the graphs, first of all I am here I write data frame dot head and call it first So if we take this, we have all the columns that they all have arrived when we put our heads down In this data we have total 148 values but when we apply the head then it The initial five data are given to us It shows here, now here we have the graph To create the graph I want to create I am using the C bun library and I am we wrote bun as import c bun s n s so I wrote here s ns dot here But we want to make a count plot here By counting a restaurant here make equal to I will write here I’ll write the code once for the data frame then well you have this thing I will continue to explain and what we have What type of restaurant is column buffet type cafe type dining type so this There are values, we talk about these values ​​here Let’s write it down first, now make this We want the count plot to be overturned dot x label and write it here Type of restaurant run by See, we only have two lines of code I wrote it and this graph came to us. I am trying to explain the meaning of this graph to you. first of all let’s understand the graph a little Then let’s understand its code, first look at it Comes to you here at X Access It is a buffet type restaurant or a cafe type restaurant if it is other or dining type then we From which type of restaurant did you have to take it out? Most of the orders are for food so now we Here you can easily remove it that Dining type restaurant is the best among these More food is ordered which is more than 100 If there is any plus then we can easily reach this conclusion Here you can find out who the majority customer is order food from a restaurant from From a dining type restaurant then The cafe restaurant is at number two The reason people order food is other and then de buffet okay so this data We had to bring the analysis out here Now we have extracted its code a little bit Understand this, now look at a plot where my By counting the numbers he is telling that the There are more than 100 people having dinner so what is this going on here count and he is telling me by doing this, when we A plot has to be made where we can see the exact If you are writing the value by counting then here We plot the count of the curve on x What did I need in Access? Which type of restaurant is listed in type to Look here we have this list end type The column was titled Buffet This is what we have done, we have put the name of the column as In access we needed the label below that What should we name it? We will have to name it type of restaurant so here x What did I do to assign labels in Access Written here type of restaurant whenever you If we used to make graphs earlier, we would have done something like this used to write na this is x axis so there We used to write the type of restaurant Exactly as we have written here And this is the graph that has come to us So the first question that was given was What was the conclusion? This is its conclusion turned out that Majority of the Restaurant Falls in Dining Category Maximum number of meals in dining category People are afraid to eat here in restaurants If we get to know about this thing here then We have solved our part number one question I have solved it, now it’s a matter of how many votes which is every type of restaurant when people If you eat food then obviously you vote Which type of restaurant do you go to the most? Every type has the most votes here Now the restaurant of has got this thing what do we need to do here for this For this we will have to write the code here Let us write its code here and use it let’s analyze so the next insight which What we have to figure out is that every How much do you like the type of restaurant? Vote for each type of restaurant It has been received so I am writing here data frame dat head is alright so what to do now No, we have to make a graph like this In which there are two things, visualization which We have to perform, we have to do something like this that the x axis remains with us what type of restaurant it is and If we want to take out votes in that access then For this, we have a line graph here. We will make such a line graph that Which restaurant got how many votes There are lines from this type of visualization If we want to show it through a graph then now here Two columns mean a lot to us The first list and type in which the restaurant type and another column in which each How many votes has the restaurant received then you Here you can see 775 787 in this way Show us the votes here Now here is the graph which we have for this key I want to make it for this I have posted the code here I am writing the code one line at a time to explain it do not hesitate at all, If you understand, let me know in the comments You can go but what did we do here? Grouped I created a variable called data. See Now first I will explain the graph then this code So look what we need How many types of restaurants do we have? Four restaurants that order buffet There are some cafes, some dining and some Everyone has other types of restaurants Look what you will see in the va axis In Y Access you will see every number of votes How many votes a restaurant has received then we You can see here that it is of buffet type He has got more than 2500 votes now. The dining here is the most It has received more than 20,000 votes Votes have been received for dining type The restaurant and other restaurants Its approximate cost is around 10000 It got votes so we had to make it that we wanted votes to come in this axis and type of restaurant here so that we can Can you guess which restaurant? type got the most votes so here Pay Dining Restaurants are the most Liked by most customers and most Most votes have been given to him now Every single code that we have written for this understand the line firstly I have read it here What is grouped in the name of grouped data? I have created a variable here called data Now in this data frame we have two columns: We meant that there was a column of liston type And the second column we had was for boards What we did was group by both the columns. that is, by doing both together, I put it and wrote the names of both the columns Listing Type and Votes are the two columns I wrote the name and made both of them equal now After this the result was equal to Dr. Data frame now these votes are inside it We passed this group data that we had created to it Now this is the plot we have made Look at this, we have made a line graph, so c This is the line graph of equal to green We wanted to keep the color green so I used It is written green here, now let’s suppose you If you want to keep the color red then you can make it red also You can keep it or it depends on your wish, see now If it turns red, then it depends on you It does whatever color you want to keep right now So we color it green That’s why I wrote this for color here now its marker what does marker mean Look, there is green at every point here You should see the green coloured dots every time you look at them. The place to see the dots here is green getting it right this are the dots isi it is called marker so we have to know the type of marker Which one did I want, I wanted dotted one, so I wrote here oh okay now x access what i wanted was an axis what did i want you to write type it look at the restaurant then write it in x access What is the type of restaurant and its color I have written red here so now If its color is red then you need to do something else I want to keep this color blue so you can right here blue Now if you look, you will see the blue color here below If the type of restaurant is different then this is for you The top is whatever color you want to keep The size is given, how big can you write now you want me to know its size and If you want to make it bigger then look at what I have written here I just made the size zero Let’s suppose I make it 30, then now Look here the size has become bigger If so, let’s suppose we have kept the size here it is 20 now if you look here it is size 20 I came in just like that and in access too We had to put a heading or we did it in access Put a heading here with the name of bots and kept the color red and size is 20 so in this way this This is the graph that has come to us The answer to the second question is I had to find out what was its conclusion The conclusion here is that the dining It is a restaurant, what do they do? We have got more votes so we are here Let us write it in conclusion Dining Restaurants If he has received maximum votes then this is for us If it is cleared then now the company knows this It’s okay brother, the dining restaurant It is our best source of income because people like it the most Now we have to do the most kind of work Cafes need to do better buffet Working outside restaurants that have If needed, get insights from data in this way Only when a company comes out with a strategy makes it clear what is going well and what Things are going bad now, the third question is The third insight we have is that we need to extract is from this question it is here that what are the ratings that majority of the Customers have received a rating of 2.5 If someone gives a 5 rating, what will that rating be? Which restaurant has the majority? We have now received this type of rating If you want to remove people then rating is very important It is important for the customer to like your product Knowing how much each company is liking it If you want then what should we do now Here are the ratings, how many ratings are there If we want to work on this then we have If we look here then the rate will be here We already have a column named now we what will we do we have to see who has received the highest rating from so what are we We will do whatever the rating is here I have given it like 2.5 2.75 so we’ll plot the graph here and A graph of all the ratings is made in this manner Let’s see which has the highest rating The rating is given here distribution so here I am I want to make a histogram so I written here pat dot hist hist i.e. that histogram now this histogram This is a histogram, all the bars are stuck in it We go through all these things since school time I have been reading things and now I am trying to code it We learn this through data analysis are comma bins equal to fyi code which i am writing you I will also explain it, so don’t worry about it We will keep its title as the title of the graph Rating by the distribution name followed by P lt dot show now let’s make it y p LT Dot have to right palti dot distribution and then here plt dot show run this so here he is saying ok data There is no R in the frame, hence the spelling It was a mistake, now look at what we are making This was what he wanted, as a histogram It has arrived and here is the count given by you now we’re seeing that the most Which likes are the ratings you received? if the restaurant has got it then here we If people watch, we can observe from here looking at this graph that this 3.5 Such restaurants get 3.5 to 5 lakh marks. The highest rating of 4 was received here So people have given so many ratings Where does the maximum rating come from that between 3.5 to 4 so it means here and look here at the code a bit if If you understand then we had to make it here histogram so i wrote hist data Placed inside the frame the column containing the rates name bean equal to 5 it means if I’ll show you once and make it three So look at all these things, they are very sticky hey right now this is what happens every time basically this is what we call beans doing five I am here and I can understand the difference, this is the thing If I do 10 then look at this and go away It will go away and you will understand it better now It will be between 3.5 to 4 at the most People have given the rating that is there now equals two if I say do two then look and you can see it clearly here It seems that the maximum would be between 3.5 and 4.5 Meanwhile people have given rating in this way You can set the beans according to your requirement You can check it after making it Conclusion of our third problem Here comes the majority Restaurants Majority which are Restaurants what are they doing so I am writing here The Majority restaurant Receive ratings from 3.5 to 4 for majority of restaurants which Ratings are between 3.5 to 4 out of four It is getting a good rating There would be concern if two are getting one If it is then you would have to work more But right now the rating is between 3.5 ser Now next thing is what do you want to take out from inside Now Jomat has observed to me that brother There are many couples when two people live together So most and especially such cities if Let us talk about metro cities Bangalore Bangalore Hyderabad Pune where two people Couples are let’s assume working professionals Most of the people who are there are from Jomat let’s order this online let’s order this online This is an overview of Jomat, now know about Jomat wants you to accept when they spend That today let’s assume there are two people and we are going to have dinner What is the average size of what you are ordering It costs Rs. 500 and we order food worth Rs. 600 Let us ask what is its average size So he wants to know about Zomat, so now for this We will write the code for what we are doing If we extract the data then let’s solve this So now we have come to this conclusion Now the next thing we are going to solve is This is how much people spend on an average order Couples do so average order spending Bye couples and this we call the heading format Let me write it down now see what to do Once you have the data frame here Data frame data head is written to the data once I will show you, now you see what is written here that is the approximate cost for two people It is given right here, you can check it here If you want to get out then here you can see now here approximate 800 800 200 300 600 is given in this manner then what will we do We will visualize this thing by making a graph because when you go inside the company The insights you submit will either be sent to you via a report You will create a dashboard there explain through graphs so that we can With all this DA as well as the visualization which yes they are performing so what can we do How many people will do it here? how much money do you spend so here There will also be an amount, we will write it down and If you write the count here then we will know It will be counted on which people spend the most Let’s see what is its average pricing So let’s write the code here I created a like variable here couple This data is written in a data frame named data. what was the name of our column inside the frame The column was titled Approx Cost for Two People wrote the name of this column, now we are here If you want to make a count plot then I have done Here we write the count plot in X access People are passing this couple data here If we go here and run it now Look, it has come to us now. Let’s see which one is the biggest So we will see here what 00 is Most couples spend the most On one order, we had to take out this that The maximum amount that people spend on average If you do it then 00 is its count here Most of the people we see here are After this, if you look here, for ₹ 50 People give more orders then after that If you look, most of them are between 400 to 500. more people order and if you are here If you look at it, the lowest one is Rs 950 for two people Very few people spend on food This means the average order spend is the highest how much is done so the order of 00 Couples would be the most ordered of 00 they do it right so this is us from here had to draw a conclusion, now see when the company If this data is known then it will be on their page The updates that will be made on the menu will be such orders will suggest which is between 00 to 500 so that What is the order capacity of people If it is around 00 then the same thing should be visible Now assume that anyone can buy whatever they can could you say let’s suppose that his budget you don’t have the right to buy it so if you You will show him i, his budget is 10000 rupees phone won’t he buy the right to take it? In the same manner as the customer’s budget You should consider it as a company and accordingly When the items were shown the company understood that Brother, when two people order food then they People order food up to approx 00 The most we do is up to 00 If you start showing them the products Is this the conclusion that got us here? It turned out that the majority of couples who ordered ₹ you keep writing conclusions like this when you If you are learning to do a project, you will forget it In future, always write such conclusions. Majority of couples Prefer Restaurants With N Approximate Cost Off 00 So you got this insight from here Now you people are the true professionals Whose such insights are very useful to the company Now we help in big tasks Next, we have discussed these four things here We have solved it, now we have to find it Which mode is online mode or offline mode The one that gets the most likes rating People give more ratings in online mode What are we for this offline? For this we will enter the code here So, first of all, we write it here. Heading Ch Mode receive Maximum rating people order online then give good rating or off in line so for this we will code here Now what do we have to do? I am the first one to First you have to read the data frame here once I will show you by doing it so I am writing here data frame dot head now let’s look here People here we have a rating what will we do if column is box plot We will make it and see, I will tell you here I am making different plots so that When you are creating your project By now you have realized that how to make a graph how to make a histogram How to make a count plot? How to make a line? How to make a graph and this is the fifth type How to make a bar plot like a box plot I’m going to explain this as well, so the box plot There are some boxes like this and There is some plot like this, for this I have Here you can set the size of Palti Dr. figure want to make a box plot given here now But we have written that order online. I need things, I want to order one online and rating now online order means yes yes Where ‘y’ means online and where ‘no’ is written It means offline and access in Wi I have written the rating and here passed in data. Data frame is now If I run this and see, we have this Look at the graph that has come in X Access We have online orders, so many people If yes, it means it is written here then you can see it There are so many people who order online here Their ratings are higher, from 4.25 to 3.5 in between and those who are offline and those who are online No, their rating is 3.75 to 3.25 This means that when people panic online They give good ratings as compared to the We understood this thing offline on this So through the graph we can see it here Let me write the conclusion so I am writing yer conclusion and in conclusion we are will write offline order receive lower rating lower rating it gets a lower rating in Comparison to online orders which has good rating then here this thing I understood it when people ordered online so your ratings are good but You need to improve a little bit offline You will need it so that is the conclusion now The last question is also a very good one The question is, we will make this heat plot You guys news about heat plot You may have seen many channels etc. but We will now learn how to make it So look, so far we have found out that the There are four types of restaurants What kind of restaurants do we have near us? we have a restaurant we have other type of okay we have one dining type of restaurant we have cafe And we have a buffet which you can order those restaurants are ok i understand that Now the order is coming in every restaurant The way to do it is to order online or So that would be yes, people can order it online or no Now let’s go to a hotel When we eat, we also order Zomato from the same hotel Does it come to our house or do we come to that hotel? can you eat it also so yes or no means Now there is both online and offline in between I want to make a graph that looks like this so that you can understand which restaurant it is from How much food is ordered A color scale We will set it up here as The color will get darker here, it means More and more people are ordering food and colour If there is light, it means less people will be there If you are ordering then this is the heat plot For this we will write the code here. that’s how to write the code for this ok So for this we write the code here. You will find this code line by line here. I will explain so don’t worry about that First of all let us look here, if we Here we have the pivot table here Before I want to create one Let me show you the bars and the data frame So that you get an idea, so I am writing here data frame dot head and look at the frame here once Let’s take it, okay, so now what did we do here? So I’m creating a pivot table here. Because we want to create a table here. I have changed the variable name to the pivot table name placed the data frame and pivot table placed inside it Which are our useful columns like we Which type of restaurant is required here? Inside it’s like a buffet, all these things are here So inside these types listed here we have Enter the column type, now order online If we do it offline then we need these columns also So we have written here how to order it online Here we set the size of the function fill kept the value zero now here we create If you want a heat map, I wrote it. Insert this pivot table inside Enter Equal T true and C map means color here we I will set this color, I kept it yellow green And we have kept the blue format as D set. The title should be Heat Map x Online order should be written in access and y should be written in access as listed type this now if I go and run here If I try it then this is ours here This is a heat map, now it’s ready, one line at a time OF code is understood according to this What we needed first was listed in Type and order was required online order then If you go here and type in these listed If you check here, you will find all four types Restaurants have come to you Dining Cafe & Buffet Right Near You It has been written that we needed the second thing whether the food has been ordered online or not It has happened online means yes and it has happened offline Meaning no, so now we have put color here. I had set it up here which I will tell you here She was showing the color which we have written yellow Green and blue, as the color becomes darker look look this is the dining that we have There is a restaurant in which there are 77 people No means they don’t eat online but offline have eaten food basically obviously when we Many times we go to a restaurant for dining Ambience to get the feel of people dining to get the feel of that wipe what do we do sometimes Going to restaurants for dinner etc. so mostly here we are seeing that If people use the dining type of food offline If there is a restaurant then people are more offline there We eat 33 but people order from there But if I talk about cafes then cafes People are going out and eating less, and off-line The food which is most consumed is snacks If you are ordering from a cafe then these colors are like As it gets darker it means range The stronger we will become now if you look at others then 2 but here we are People are seeing that two out of every 10 people of others which is cafe not cafe but other type The restaurant is going offline to eat and most people online buffet Same thing is happening in the buffet too On an average your people are three here If you are going offline, then four people If you are coming online in this then this is the whole I got the complete analysis after looking at this one graph. I am getting to know all the insights from this If I am able to take it out then I will get its title I had to give a heat map so I wrote PAT Dr title so look here is the heat map x We had to give the label in the axis here and If I had to give it in y axis then it would be in y axis We have listed these types and We had to give it online for X access order so in x access if here I Let me see, my online order has arrived now Look, the color is getting darker As we move towards the color blue We are going to do this show with darkness and if your range is low then click here Look at the yellow and green type shade It is showing you here, so in this way This was our conclusion from now on looking at this, looking at this graph Let’s talk about what conclusion is coming out We will write this in heading format Let’s take this conclusion so here we can The conclusion here is that Dining restaurants which are mostly Offline orders come to him from cafes We get more online orders this time Suggest that clients prefer to place Orders in Person at Restaurants This means that more people like to go in person Let’s talk about the ambiance of the restaurant and to pick up the vibes but mostly Online ordering is also available from the cafe, joke Mainly items like your snacks etc. If it was then it was basically a Zomat We have the complete project And sometimes such questions are even asked in some Jomat When hiring happens, sometimes such things happen Questions also come up, so if you do this The project that we solved today If you solve it then definitely somewhere Somewhere this will boost our confidence our portfolio and our Understanding our skills is very important If it makes you strong then this was today’s project whose code you have in the data set everything Description box is available below you can check it and many more like this projects if you want to do That Python project you want to do Whether that project is of machine learning or Then you want to do that project in SQL. or Power BI, then there are more like this Your projects are complete If you want to watch video lectures on Python Want Machine Learning SQL or Power? If BI offers these complete things for free The I Scale is available in courses You can check out by going to the website You can check The Eye Scale website and app Where you can find free data science data If you will get analyst courses then there More projects in these courses by visiting You can learn more lectures and more concepts Can be used along with notes port files And everything and today’s project too I have written all the notes and port files If it has been provided then complete it and when this project is completed Don’t forget to tell us how you felt in the comments How confident are you about completing this project? If it increases or not then I am waiting for this thing If it stays then we will meet in some other time Keep Data Curious in Video learning and stay motivated along with the Data Science & Analytics on iScale’s Platform Premium courses in data analytics too are available which you can check out The Dai Scale website and mobile application But where you complete the detailed curriculum Lectures End to End Projects Live Doubt Classes Industry Recognised Certificate Off training as well as interview You will also get help for preparation the link is in the Description right, let’s start today in this class project where u We can do a complete project of data analysis inside which we must have been data How to do EDM cleaning All these things about how to do visualization But there is one more special thing about this About the project which I am going to tell you about here I am going to see, we will take on any project If we make it then the ultimate behind it The objective is that one day we go to any company for interview We have to crack the race with this mindset When you do a project, you go for interviews If you go for the company interview You will know what the rounds are Most of the data should be known analytics data science business analyst All positions that are being hired for In that generally like three rounds of There are three to four rounds of interviews and It depends on the company company but what happens mostly is round Number one, the company gives you an assignment Sends you some questions in which There are problems to be solved, they will solve them for you You have to submit it within 24 to 48 hours time is given if you win in this round If you get shortlisted then you will have to appear for the round A call comes for number two technical and If you are shortlisted in round two also If you go then your third round is HR round or the managerial level round which is called If you get a call for that then this project Through which our round number one is Where the company will give you a case study How to solve the assignments she sends how do we submit it should make projects like this that we prepare ourselves for this round Was able to create potential and for this round You should be so capable that we can take out the round So these things are also included in today’s project You will get to learn how to The company provides case studies, so here the most first what happens like when we have a Do any assignments come to be solved? For the interview, first of all the company tells you about yourself Sent documentation or PDF or something like that in which first of all you understand After that let’s know the details of the company You are given questions in this assignment I will solve it and submit it to you if it has to be done then it should be done in the same way as a You get an email from the company’s end just like that I am here to help you get this project done If I am going to start everything first, it’s on you Introduction given about the company u Technologies commonly known as u It is said that this is an American multinational Transportation company and more Courier Services Food Delivery Fry This is also true in sectors like transport The company works as the main head of this company The quarter is San Francisco There are more than 70 countries in California They operate in 10,500 cities. World Wide Inky Rights Available Services It is available along with it world wide It is a big platform with 15 crore Its monthly active users are 60 lakh In this the drivers are active and its If we look around every day then it is 2.8 There are more than a million trips that take place People do this using this platform. Now if we talk about the company’s revenue How much is Rs 37.2 billion for 2020-23 It has a revenue which is quite large the amount is because it is already very There is a big multinational company now about this You have got the information, now this You will get information about how it was made here you are getting that here whatever you are getting You can see the man on the screen here Its name is Camp Garrett which is basically u He is the founder and the idea of ​​making R is his The first thing that came to my mind was basically this It was 2008 that Paris was in a lot of trouble It was a snowy evening and a lot of snow was falling Not much public transport available So in that frustration he told them It started coming to my mind that such a There should be technology, there should be such an app so that I can book the rights and My driver is standing in the place where I am standing If you come to the place and pick me up then this He had a problem and he had to find a solution started and from here the idea of ​​u came to him it came to his mind, he started How did you not become a Kudmir in the beginning In the beginning it used to be that you said let’s suppose If there is a car let’s suppose that car You have booked, you want to go somewhere booked a car, now there are more such people who are suppose that your office is like this, I will take you by example Let me explain to you that your office is Let’s assume your office is near India Gate and you are the one who has to stay let’s suppose you Do you live in Chandni Chowk now? If you need to take LETS to go to India Gate If you want to book then what used to happen earlier that all the people who live in Chandni Chowk And for all those who want to go to India Gate what would have happened to them was that right sharing What used to happen in that was that whatever amount of money you It will seem like it will divide you people. If you can, Uber started in this way first but after that gradually what today is we are looking for u if i can find any place I am standing now, I will take out my p If I book the rights in that then The driver will come directly to my location It seems Uber was not like this in the beginning initially the rights sharing platform which was that we can share the like cost that I had an idea of ​​the method, but slowly This idea changed and the camps that followed He met Travis Canick, who Its cofounder is and this is Pra Cania King Ye was very good at technology He had already formed two companies of his own and time, after that they got Uber If he liked the idea then he also told u I joined and in this manner I got my job in March 2009. in u starts properly Now when u is launched then first of all this sa Its beta version launched in Francisco It was done and R’s first ride was in 2009 It had started in but its first The ride that was booked took place in June 2010. very soon very positive to u I started getting response from people so in 2012 In 2015 u started expanding internationally The first thing they did was their expansion He started expanding it in Paris and also in the global market u When it starts reaching then the right sharing of u is Those are the four types of right sharing u x i.e. that every day if you get an affordable right If you want then you can book u x if you want u pool You want other passengers with you and everybody has to go in the same direction So you can book a bridge if you need more More premium service than Joe Black For cars that run in foreign countries u can book u group and u can book single You have a very large group and you have a lot of If you want a big spacious vehicle then you You can book single as well as today u ts u Freight and u for Businesses like You can also sell your business on the platform moving forward now how do u earn money So whatever commissions we get for whatever rides The commissions that are there in the booking From that u earn money, there is subscription is that you let’s suppose I am one such I am an employee whom you book every day and give me your If I have to go to office then I I can buy a subscription and You earn your money from advertising he earns from here the main important thing is u The thing that is important for us is that you stand strong Data Science in the Domain of Analytics it works on domain why does it work if so then its first point is this TA estimation i.e. arrival time which it happens now let’s suppose that I am here I am standing, okay, one of my locations Suppose Chandni Chowk and where do I go if so then let’s suppose I have to go here Chandni Chowk to Rajiv Nagar now its B’s The distance is how much time will it take for the driver Which driver is available in coming then this For the estimation of all things we people You can also read Machine Learning Algorithms Tips here Lie learning algorithms are responsible for all these things. now as soon as it is needed I book u from one place to another If you know then it immediately starts telling the price that If it costs you 00 then this is the price Prediction is the data science behind it There is a big rule of data analysis Optimization moves from one place to another How much time will it take to estimate the Have to tell me the route for all these things Algorithms are also used in data science happens between the driver and the rider Now we can help you in making perfect match Even if you make payment many times, then someone There should be no fraud in that payment, There is a domain, it is mainly used here Because of data science data analyst You just made a pap of u but that pap Can’t tell from one place to another How much will it cost me to get to the place How long will the driver take to arrive? He will be in some This is why data science is useless All these things are possible with the help of analyst it comes where we can tell that How long will it take for the driver to get your location How much will it cost which one is good This is the route to go for all these things Data science is the use of data analysts and so u are also hiring for this position if it does then this is what started in you That was for data science data analyst It was launched in 2011 to 2010 But work on it has been going on since 2011-10. This is the person you see on the screen Look, his name is Kevin Novak He was basically the head of data science and used to lead The background of me and him None of them came from an economics background It seems that I am a master in data science There was nothing like that were supposed to come from economics domain but He had a very wide interest which he Data Science had developed the skill set He is very much into data analysis Now this person was helpful, he was seventh I had joined as an engineer in R A very small company was started very early It started out small, so when The new one has come to give you the interview Someone told him what kind of a startup is It is open, you can give interview if you want I got to know from a friend that when he took the interview When I reached to give it, I was wearing a coat, pat and tie We reached there but it was a company which She was walking from a very small place so she felt that you should join or not but He knew very well that here This company can definitely grow at some point It will create a very good revolution They then used computational algorithms to This company has captured the science here I started leading it and as a chief Data Scientist he worked as a new After this, in bringing the technologies Now, it is of use to us that the thing which the company has It is given here in the documentation This is that we have told you everything about the company Now let’s assume that you are about to that you are working for data analysis I have six questions for you, You have been sent an assignment for your You have to solve this in the interview what the first question is saying is which People are most interested in this category let me tell you this second question he is saying that most of the rights people For what purpose do you book to go to office I book, I book to go to a party where do we go and book restaurants Let’s book it, after this the third one is that At what time do people book the most R caps? Now let’s see what the company needs to know It is very important, let’s suppose it is 7:00 in the morning Most people come between 10 am and 15 am Let’s say I book a cap to go to office Unless the company knows this, the company How is the driver available at that time? You will be able to show all these in the app It is very important to know the information of the company and we brought out this information here Forth is telling which month The least number of rides are booked during the week Which is that day on which people celebrate the most? book more rides and how many Miles or how many kilometers people have to travel Prefer to book rides now All the information is given to us by S.A. Assignment Now answer all these questions We will remove the curse from us here It is provided, it will show you the data once This data is provided to us by the company There are many columns in this data that the right one starts with what is the start date what is the end date who It is C category how many miles do I have to travel What is the purpose of knowing all this information We have been given what to do now Insights have to be extracted from this data and this questions are given to us to solve There are six questions, we will answer these questions We will solve it one by one so let’s go now Direct move of Jupyter Notebook and let’s solve this assignment in this so first of all we give the project all right People will see that you have the notes How to get it Where will you get the data set You will get the code files for this What to do simply Inside googlegroups.com Lore Courses You have to go here and select the category Want to do free category now it is free here Our free data science category There is a course in it, not only you will the project’s data set but also Lectures on machine learning So you can login directly First I’m going to go to Register Now here and After this, your details are here We will mention the details then after Your email address is sent to us here You will have to enter whatever mail address you use. you can post it here so here on the island contact@gmail whatever is your mail id Basically you have to put it here After that whatever is your contact number, you can I will mention it here, after that you will see it here You will get the option to register You have to click on the register now here Your verification should be successful The mobile number you entered is already there In that you must have got the code here, so we We have registered by entering OTP, now we are here You can directly login to any You had entered your registered number here you will enter your email id after that whatever The password you must have created is simply We will enter the password here and then We will pay here as soon as you log in You will be successfully logged in here to see the interface something like this will get Now after this as soon as you go here If in the courses enrolled in your courses You can visit us for free courses here If you want to select pay then right now we have selected any This is why you did not enroll in the free course It is showing blank here so its what we will do for this explore here We will go inside the courses here again Selecting the free category will give you free data We will go to the science course and Here you will see the button ‘Enroll Now’ You can see the button of enroll now right here So by going here we simply have to tell people this Is this a free course within the course? There are no charges for this too so here we are Simply go here and enroll now You will now be inside this course by clicking You have been successfully enrolled, now you can return If you go to your free courses from now then We will show you your free course here If you open this free course, you will feel The first one you see here is Data Analytics Project You can find it here All the notes, code files, everything. You will get it here, you will get it here plus The symbol will appear as soon as you go and click on it If you do this then you will find it here No notes on the project and find it here will go to u project’s data set this is then You will get it as soon as you click on this If you click, you will get the notes Also, your data set is You will get it easily here, how to download If you want to do it then click here to download You will see that you will see the symbol of two arrows It is given here, simply go to it You have to click, it has been downloaded and this We have both things in proper manner If it has been downloaded then this is enough for you Along with this this pre course will be helpful Lectures on Machine Learning in Python Lectures, all these things are for you people. If available then download the notes in this way So let’s get started today Let’s go to class and start our We have to open the project now How to do Jupyter Notebook in your Your Anakanda will have to go to the system Navigator is installed, you need to open it I already have Anaconda Navigator here It is open here you can go to Jupyter Notebook As you go to the latch you will find the button here We have to click on this launch button If you want to do it then our Jupyter Notebook is our It will open on the browser as shown here I am done with it, now what are we here for? I will create a new folder Now, here we have given this data set There is a lot of data in this data set This data set is available here We will do it, we will upload it here Firstly I uploaded it here, see here The pay button is given to you here upload In this I will simply go here and upload it we will go to the button this is u data set this I opened it here, it has been uploaded It’s gone now here we’ll go to python3 IY Colonel here we are, We will create this file which is ours to open It’s over, first of all we have to rename it Let me name it here now. hmm u data analysis project is it ok We kept the name and have renamed it now If you go back to this folder now Here you will see u data analysis the one you renamed it here The rename has been done, now what is the first thing to do If you want to do it then the data set you uploaded Open it once and take a look here This way you will get the data set that you have entered it is available to see here now What we need to do now is to open this Jupyter Notebook In this data, we first tell people A lot of work has to be done in this If you want to clean the data then for this we People will need libraries here so first of all we should focus on libraries here We will start importing first There will be a library, Panda, which we will call We use it for data cleaning There is quite a useful library so I I will import it here Panda Edge PD then Next Library We do not do any mathematical operation here If you want to perform then import Napai S NP after this we here If you perform visualization also then import Matte plot lip this library is Matte Plated Lip: Who is this for? to perform our visualizations For this purpose import mat plot is available Plot S Pat and another one adjoining it Libraries are made of wood which also help Now she does visualizations for us We have listed all these libraries here I have imported it Now what do we have to do after this The data set needs to be brought here for reading that file is the csp file which we have I have uploaded it for what I am saying here I’ll do a variable called data By set name and within it data set is equal To read this file I should write this I am going to PD read CSP file and here But what is the name of our file? The name of our file is u data name If we have our file then we can write it here I give you some data dot csv okay then it will come here Let’s put double inverted commas in it Let’s close it here and run now I’m going to divide the data set here by this variable when I call then it is showing certain error let’s just check data csv ok here what is the name of our file data set It is CSV we just wrote the data hence the error If it has come then let’s set the data here And let’s run it again, now this run It’s done proper now here what our We have the data set that we have This is our data set file which has been read. Now let us focus on what The columns are given to us firstly The start date of your ride is given On which date did it start? The date has ended and look at the time here It is also given to us that on 1st date 2016 It started on 1st of November, 2016 The end date of the right is its timing The right started at 9:1 and someone probably If the junction is nearby then it is a 6 minute right It was 9:1 right end is where it is now I had to know what the category was for business purposes I had to go to the start here which is the fourth vice Here the pierce is given, stop is given It turns out that one of the locations is Fourth Pierce like here in west palm beach so this location It is given from which location it started And how many have ended at which location? How many miles of delay did you have right to? 5.1 It was meals and for what purpose did you go? The purpose of multi-shape sl entity attainment was So in this way here you will get all the This data is given in columns every day If we look at the set that is here then total There are 10056 roses in this and the total for us How many seven columns are given here Its shape is given here, if you Have to find out whether its shape is proper so what do we write for that data set dot shape we will write it here So here it will show you that the total in this 100 116 What is Rose and Seven Your Columns Now, after this, for this data set, information i want to know that this data What are the values ​​in the set? I need information from this so I Here I will write ta set if bracket close if we run this then now this data set We got all the information, now see This is the start date and the end date Data of object type is Object meaning The data is of string type, ok, after that Here we also know the categories Data of object type is given start end stop this is also object type data which miles how many miles have you walked So what is this floating point in this ride There is data and the columns that have the purpose I have data of object type now you are here If you look at all these values, If you figure it out correctly from this If you want then there is such a column here In which a lot of values ​​are missing Values ​​are given to us here right so now these are the missing values purpose this is how we deal with it I will have to do it because there are a lot of such things here There is a lot of value which is missing values Let’s see how to deal with missing values Let’s see this, let’s move on now The data we have is so good There is no data why it is not there because here But many of your columns are about purpose. There are missing values ​​in it, aren’t we now? What will people have to do before data pre The data will have to be processed How will you have to bring it in the correct format? It will come in the format, what will have to be done Let us understand that first of all now here first The thing is that what is the missing data, first step this is the missing data with this we People have to deal with this, how will they do it Now we will learn and the second thing is that The start date and end date are given in The format of both is a string the format is the object format so now we People will have to change it in a proper way proper date and time format we’ll have to change it here right so in Now we do pre-processing of things and in this both these problems will be solved If we solve it now, then the first thing which The problem here is that I first put the heading I will give you the data, we will do the pre-processing how should you give heading then you people To give heading, write hash in space You have to apply it and then write the data pre We’re going to do the processing here. go here you will find three code marks Selecting Down and Raw Mark Down and run it here as heading This will always come whenever the company When you submit a project, the heading should be proper I want the comment to be proper which step What should I use, please tell me by commenting properly If you want the right then click on the file given here I have put it in the notes for you the whole thing will turn out in a very good way Right now I’m just teaching you project so I comment a lot I am not wasting time by writing etc. But when you download it in Notes You will be shown how to make a deposit what is the right way so here we are now In data pre-processing, this data is Our set is inside it for the purpose The column has a lot of missing data in it The one you see here is written by the name NA If it is right then this data is not available Now what will we do with it here? you will figure out what I want Wherever YA AAA is written it is missing These are the values, write them here instead Not OK means data is not available there is no purpose in calling it not If you want to replace then this is here My data set is: inside this my column is what is its name so the name of my column This is the purpose, now this is my purpose column what to do inside it instead we People feel a function, we are here We will put it here and NA which you have just written in its place i want to write not come and tell this thing to us here If I want to do it permanently then I will write to you in place i equal to write right and its Later we run this so here for you to see something like a warning you will get it and after that if you come here again data set dat head call karo head means You have the first five data if it comes in then i will do y p data set dot head If I call you here then now you are here But you will see that earlier he was coming with NA written on it Now it is here in missing data in purpose It is coming written that it is not ok now we know no what is the purpose its place is empty we have put it here not ok now its What do we have to do next step after that So now in the next step we will tell you this The start and end date is its time which is why does it need to be changed in its format It has to be changed because the format it has right now is What is that object type, see it here It has been given to us in exchange for this what to do with it in the rush of date time how can i put it for best First we will set the data on this and its name will be given below: inside this is my start date and end I have column name by date name so I will write this as the start date ok Write the start date here and After Start date and then what we have to do I would have closed the start date and the bracket is equal to now we have to change this is in date time format then date time Pandas library for converting formats which is yours so i wrote pd dot Inside this there is date time frame then PD dot to date time this hum log yahan pe function will you find out what does this do for date and time if that helps to convert the format Here I have written the date, time and its date If you want to change the time then this is the data set Inside this, your start date There is a column that we need to change so I will click here Let me write start underscore date ok yes, we write it down here start date and then one thing here what does errors equals two mean Now let me just explain you each and every code The line I am going to explain to you is very There is no need to panic too much You will understand something now that I wrote here errors equals to course by doing this means What happens if there is an incorrect data date value it’s right if someone is wrong it means there is no date If there is value and it is wrong then what is it to him? what does it do to fix it Not a time nt in his place puts the value it means not a time Now let’s assume that we know that Like in the morning, whatever time it starts in the morning it is right 6:00 o’clock, it is 12 o’clock in the day It is 12 o’clock, it is 12 o’clock at night, so It does not happen that we tell a different time are you here or else if we like Indians If we look at the time according to the railways, then one It rings, after that 13 14 15 16 such timing It starts, it does not happen that 26 comes If it goes right then this wouldn’t be a fable There is no time like this if there is a wrong time if it is inside the data then we can do it If you do the course then they will remove such wrong data what will it do, it will put the NT value and it will help to remove it so I have put it here it is written like this now this thing which you have written in this We have done the same code with spurt date For whom do people want to do the end date also If I want to change then what should I do here? by typing this code control A control C I copied this and then Now I’m going to paste it by pressing Control-V. Wherever there is a start date, I will what will I do when I go and date Because I need to change both these columns. If you want to do it then I have written the end date here Even here where the start date was I I will go here and change it wrote and date right now after this finally If we go and run this code then it is showing get set not defined ok here Somewhere it is showing data set not defined We made a mistake here, the data set is There must have been a spelling mistake in this Because this is an error, now the spelling has been corrected The error has been removed from here, what about here now? You have to import date and time so now we have changed the format Now let’s see if it has changed or not format actually so I’m going to read here set it If I write this and we run it here now let’s see what it was before The object was showing in both of these now The date and time are correct here now we will do one more thing, what will we do here now But we will create two more new columns what would be a column here that would tell us people which date is proper which date is right It has started, tell us this and Look here, the time is written here right i want some time here separately Let these two columns come in the column what to do here is to prepare it Can you tell us the proper time here also? What will we do for him? Two more new ones If we create columns here then How to create the columns for your So here we will import from date time date time a module already it happens this library is built here inside it we will import date from inside it time then this is our data set Inside this we will create a column, its name is There will be a column named date and a We will create a column, its name will be time here What I am after is what is here till now I have even given the purpose, I am saying that and two we will create new columns of one column The name will be date and the name of the second column will be time so that the date is written separately and this It’s time, I should write it here separately. So we’re creating these two new columns. So let’s make the first column date For this I will write PD here by name Dot date time index ok this is the function we call people will call it date time index and its What will we put inside the data set we have We already have this data set in our there is a column its name is start date so i It is in caps here so I will write here I’ll give you the start date okay now this start date so after that here we People should close the brackets properly After this, we will put the date dot here. date is ok i am just doing this much running I am showing you so say data time here ok here data is not time but from date time must be due to spelling mistake There is an error, the date was misspelled So there is an error, we have cleared it now. Now I’m here to set my head if I call the bracket should be closed now Look, a new column has been created in it What have you given as your date which is different here This column is given to me by It became possible to create another column in the same manner I want whose name is what whose name is time to do what it takes for him I have to write the same thing as written in the code above I won’t be able to spend time writing and explaining I will copy this so that I can save you time I have been doing it but when you guys do it yourself typing the code as much as you can The more you practice the more you remember things it keeps happening now I want that my The name of the next column should be time and this is whatever for the start date and here I am now Who needs this in which format of the hour In the format, I have written our here Now after this run the data set here If I do it then look here, yours has arrived now A separate column has been created with the date name and a separate So a column was created with the name Time so this one He was with me, now he is separated here There is a separate date and it has been given separately It is right, I have understood this much now Now let’s move forward and do one more thing How will we divide it into categories now? Look, we don’t say that Mostly if there is a ride at 6:00 then it will be at 6:00 So the morning can be saved and the evening can also be saved if possible then what is the category that Morning was right, afternoon is also ok was it right or was it evening’s right or It was night time right so what are we going to do with it now? We will divide the morning in this category afternoon, evening and night so what am I I will create another new column here that What will happen in the column will be that we This is the time, this is the category we created If we are going to put it here then I will create a new column here for this Name Let’s say I’ll name it D Night So which right was here for how long For example, look at the time in the morning, This time is from morning till 10 am. what do we call morning time They say right now let’s suppose from 10 o’clock By 3:00 in the morning, this is yours Afternoon ride is fine now after that evening ride From 3:00 PM to 7:00 PM It’s time for your evening and then it’s 7:00 This time is from 1:00 am to 12:00 pm If your night is over then according to this we Now people are divided here by making categories how will we make the category so let’s do this Let’s see, I have another new column here I will create a data set inside this and name it I will celebrate the day of another new column here I’ll name it Knight okay So what am I doing with this data? Create a new column inside this data set I am writing this, what should I name the column Day Night so here I am My own column is called Day Night I am keeping it okay now for this I am here If I want to create a PD dot category, I will use We will install PDCT function Equal to data set: We will write P here. What time do we need in this data set Okay time this is the one that our column is made No, this column, this time, this column I am posting it here because of the time how can you categorize without that If it is morning or night then I wrote here times comma now bins we will write here that Do we want to give away what we have? What does right buns mean time frame that means from 10 a.m. onwards like I Here bins equals to square bracket I will apply it from morning till 12:00 in the night from after noon till 10 a.m. Morning time will be from 10 am Three till 3 p.m. is 15 okay that means till 15 means till 3:00 Our afternoon after that 19 means 7 in the evening Evening time till 12:00 PM and then 7:00 PM 24 after 00 o’clock means 12:00 in the night It’s been night till now I have not spent this time here I have given it here now what is the label of these beans If it happens then the first label will be ours, that is Meaning when it is 12 o’clock at night we say yes, if it starts the next day then from the next day onwards The time will be from 10 am to 15 am we will give it morning label so I here the labels should be equal to To the first label I will give here in the morning ok morning i wrote here The next label I give will be mine I write about the afternoon here Afternoon then the next label which I’m here I will pay, it’s morning, it’s afternoon Then in the evening I write it on here evening then what will be your next label Obviously night this label we put it on okay we have given the code here run so it is showing certain syntax error or syntax error because here We forgot to put inverted commas Let’s run this code and see what happens We wanted to create a column and the column is here whether it came or not then I will write here I give you the data set dot head after this we run it So here we can see yes, the column we are looking for He was here and has come and is now here It is 21 which means it is 9 o’clock in the night here The proper category has arrived night right so this By the way, you have everything here Now it has been arranged properly What do we have to do one more thing here in data pre processing that All the null values ​​here are right We call it the data in which there are missing values. what people want to do is delete If you want to drop him a line You will have to write the code key in data set dot A means remove any null value to do this and write it to us I will have to break it in equal place so that it gets removed If these values ​​are taken then I have written them here place equal tot let’s run it is showing certain invalid syntax latest check what sort of syntax error it is here It has been installed by mistake so there was an error here This has been removed, now we will come here once again See, by setting the data to a dot shape, here it is There were null values, they have been removed from here now Our shape has come to such a pass that now this There are 403 rows in the data and there are 10 columns. It is now available to us what do we need to do next step The first step is to work on data visualization what did the question tell us which one People are most interested in this category right book if we do then we will go here and see that We have a column called Category Category is showing business can be done and There should be some category in which category the people are If you book the most over rights then We will make a graph of it here. If you show me then the first question is We are solving it here and Our visualization starts here now. If yes then I should give proper heading here also. I will provide data visualization from here we will If you are starting then apply hash here We need to select mark down and this is our heading is speaking the first question For which category people are most interested If we book open rights then what do we do? We will make it in graph format A graph in which whichever category is the most If it is more then we people know easily here If I could walk, what would I do for it? People will build it here if we If I want to visualize it properly then I I will write here pat dot figure we here I want to make it and this figure is We will make two plots here I am collecting the questions here together what is the first question to solve He is telling that in which category people are Who books the most and for what purposes? If you book for right then we are here I can make two sub plots so I will make two Put questions together in one diagram I want to show you what I want to say I am showing you, you will stay on one side We will create people for the category and another These two will make a graph for the purpose The graphs that we will have are our bar graphs This is how we will make graphs And whichever graph is higher, we will know Most people will go for this category overwrites the book and for this purpose So we have two sub plots here I want to make it, that’s why I am writing here I’m going to pet dot figure and then we People here will judge the size of your figure If you mention it here then I will write it here Give me the size, this is the size, let’s suppose figure size equals two 20 5 i want to keep the figure size here hmm okay we have this figure The size is coming now I have to make all the plots in this i want to make two plots so I will write here palti dot sub plot because two graphs have to be made So here we will write two graphs I want to make x axis wa axis for this In a way, this is a representation of you right now. Now I will make this first I will use the Seaborn library so I wrote here SNS the first plot which we People are making it here which gives us the feeling of a bar The one that looks like this in which numbers also appear is I have selected our count plot here. why did you take the count plot ma’am so the reason for this is now just making a graph When it comes you will know how much it counts This is what we have to take out the most Which category do people like the most? If you book it means most of the people It means more than just some number There will be like 1500 people, let’s say 1000 What do people book rides for? There may be 500 people to go to the office If you overwrite the book for someone else then I need the number, that’s why I am here It is written count lock so that they can count us If you can tell me the numbers then I will write it here AA D Count Block Inside this, we have data I want to create a data set, I will write it here We found the category column here If you want then I have written it here category okay after this here I will I will close the bracket now after this If you try running it, then look at it this way Two categories have come to you here One category is your business and the other is Personally, now if I count this on you If I see the plot, you can tell me comfortably You can choose the right business category for your business. I use u’s personal name the most We use less for category, it is clear It is understandable up to this point Now let us move on, here’s something else If you want to write down things then this is an If I want to rotate the axis and write so here we can write PT D A6 You can also write here You have to write in small print Palti D xxx xxx and in this rotation we people You can write that if you rotate this, you get We have to write rotation equals to 90°. If you want rotation here then I have put it here It was written 90 so now look here, this is yours The category has been created and here is your You have already reached here by writing the count. is already at 90° so a graph This has become ours now, this is where the purpose lies I mean our first question was that we It is clear which category People book Uber Right the most for this If yes then people are most interested in business category This conclusion is why more overrights are booked We have made it this far, what is the purpose now? We do this for the people here If you want to remove it then I will make another sub plot here If you want to make it I am here I will write pat dot sub plot now all this Inside the plot I will write 1 2 2 ma’am this what are you writing tattoo in the first one Look, I had to make the first plot, so I had written twa which means two is our already access is already given here first I have to make a plot so I wrote forest here Now I want to make another plot. I am writing here 2 so 1 2 2 now who We have to make the graph here We will also tell you which graph to make We will create a count so that it can count automatically If you can tell me then I am writing this Dr count plot now inside this count plot is the data set now inside this data set which This is our column, this time the column we will take is We will take the purpose column because category We have already made it here ok so i put the purpose here now If I simply run this by going here So now look, two graphs have appeared first There was only one, now two graphs have been made here If we look at the category, then business People use u the most for category We do this not for personal category From here we understood in the second graph If we go and look here, then not that you know that n n values There were null values ​​so we named it NOT It was written in it that now if we go If you look, most people use it If you use u for meeting then it is obvious It is important if the category is most important for your business if there are too many then what is the purpose of using u I use it for meetings what else would it be used for after the meeting if yes then it is in second number mile or They had to go somewhere for entertainment if yes then book it Then use it again for customer visit Then use it for supplies To go to the temporary site and Office suit is for business For which category and for which purpose People book u the most u have the best time to go to meetings If there is more use then these were the two questions Whose answers we have to give properly here what was it used for we did it okay so answer these two questions We have just solved the previous answer here Business category came, second answer came meeting here now asking which one People book u the most for timing Let’s kiss you like a morning Now this is us here for the evening I have to take it out, how will I take this thing out Let us see here which one if people book u for timing then We will make it here too snssdk1233 it is booked at night for this Which column do we have for day and night there is a column so we have called this day night column I had made it so I will write it here This is our column this night We will plot the counts within the column with Now I will try to make it, simply if I run If I do it then we will have a simple one The graph has arrived, you can see in it who u are most booked for this time so u do it the most during afternoon time It is booked during evening time at night time and at morning time u People book the least and this is also Our third question was at what time If you have the highest count then you can see it here there are almost 140 of us who are 120 people book for afternoon who in the evening time we do approximation 70 people do it at night time and In the morning time there were around 50 people who yes they book r which means most Most of the bookings are done during afternoon time So here we were asked which one Uber is booked the most on time that’s the afternoon time three We have just asked the questions here We have understood, let’s move forward Let’s look at the next questions now The next question is what is he saying that here we have to analyze the month which is the month in which least number of people book u so now we If people want to see about it then month What will have to be done to analyze this This is our data set column, in this we People will now have to create another new column Let’s know how to make a month whose name is Let’s see, don’t ask me any questions I have been here wondering which month it is Where the least amount is booked and during the week Which is that day where there is maximum crowd? What will I do if I get booked? I’ll go and check my data set now so let me just right here data set dot head I’m here I write but let’s run then see now What do I have to do here? Give me more New columns will have to be created here, this We have a date, so I can know the month what should i do here for this you will have to create a new column in which month comes ok january february now Here you will see that just like January 1st here pe hai right so what day was 1st January because which day of the week do we If I want to find out then I need another column here I will have to make a new one where I Where can I find out about the day? Let me know what right means That particular day was Tuesday, Monday, Wednesday We’ll have to put him here first of all what will you do for these columns If we make it here then we will need two new ones for it If you want to create columns here then Let’s start our work in the first month if i want to analyse then what am i doing here I will do the data set inside this data set I will create another new column named will be by the name of month okay I am by the name of month And I am creating a new column for this Here we will write PD dot date time This is our index, which we will call here will do pd date time index function like we did it before, after that this There is a start date, right, inside it we will will take out Start underscore date and start date which is our There is a column inside it, what do we know If you want the month then I will write it here start date bracket proper close The start date bracket will be applied here square brackets so let me just write this here bracket properly closed dot We will put it inside, we need the month properly Now it is month that we will have to do labeling as to who what do you want to give to me this month so I Here another variable named month label I will create month underscore label inside it What if there is simply nothing inside it Maybe we can create a dictionary here There must have been 1.00 if it was written in this dictionary what does it mean one then dot 0 if If it is written like this anywhere then it means the first the month that is the month of january okay then after that write for February if so 2.0 so I will write here 2.0 somewhere if it is written then coolan should come here This is our key and the value inside it If you want to enter the value pair then we will enter it here so if we make it then this is January it’s okay in this way if 0 is there anywhere This means which month is that? The month of February this is exactly how we are all up to Till when will you write likes, fill it up till December if you want to check it out then I have already posted the code here It is written so I am taking a lot of time now so what am i doing simply I am copying you here so I am simply Just copying this, you guys should not copy yourself Writing Code from Habit to Practice Things to do it’s necessary okay so let me just do one thing here let me just copy this control a control c and here control b so here But now we will see what is written. If it has happened then let me explain it to you once PD. date time index data set start Our date was here, after this every month We have created a dictionary here. what have you made in the dictionary so that here It is 1.0 which means the month of January is 2.0 which means February is 3.0 meaning March is up to date Now we are back on the set till December what will you do with this month label also will map so I used map function used so that the month which is with it The measurements were done and then finally we came here Created a variable named Pay AO and entered the data put the month value counts inside the set And after counting this every month here, now I will give it to you, I will run it and here I’ll go and write data set dot Write head data set dot head here Let’s run so we can see that month in the name The column is ready and look here, January If the month is one then here you will find the month of January has started showing so the column which we I wanted to make it, now it has been made Now we have to figure out that monthly Right, in which month did it occur the lowest? yes that was the question so here it is What do we have to do for this graph? I will have to make this icch padi dot data frame ok pd dot data frame i am here But I will apply it and inside it, whatever is our month’s wish These are the values, we will put them in, I will also I am telling you not to be too worried that this what is happening suddenly it’s a very easy code But I’ll write it down first so I can To make it easier for you to understand, here we have One basically puts it in a dictionary format we want to post this so let me just use here the curly brace okay I need to put curly braces so I will put the code here I am pasting it and the data here The frame is curly braces we wrote months The values ​​of the month in me and the value We are applying group by in the count So that we can know how many likes we see which was that month in which people were most If you book less rights then how many are these He has walked many miles, if we come here Maximum amount will be calculated every month We will calculate the value of maximum biles and If we calculate the total for each month then we will know It won’t work, what month was it like In which the cabs that were least booked were yes right so that’s why how much you and I are If you book for any distance, then every At least a few miles have been covered in a month, it seems like Suppose in the month of January, Rs. 600 I have walked miles, maybe in the month of February you have travelled 700 miles so that’s us has to be taken out here and after that here I want to make a line plot of months And we will put the value count here Now we have a line plot here. Let me run the code once and show you Then you will understand this code more easily. now look at the months here As we will see here, these two lines You will get to see this blue color This is the line that it is telling us count of months and this thing here The line is yours, we can speak it You can see the dotted line here The dashed line is telling you this value count value count means that every How many miles does your car travel in a month? Whatever it is has gone here so if we Here we basically have to focus on months that in which month is there such month where u rights are booked less so if If we go and see here then you will see here You will see that this month of January and February You can see the downfall here and People are seeing November-December These are such down falls in time where you If you see this, you will analyze it Also if this count is your plot if you see this also then this is such a time It is the time of January and February and these are It’s the time of November-December where the graph We can see it falling like this here That means that this is cold weather It is a cold time, whatever rights you have in this time It is the least booked here and This data is basically US based data And it is already snow fall time there If it happens then we will consider it as a luck rough evaluation if you want to take it out and show it then we can say that it is a very irregular curve but the time we People can see here what time it is This is the time of November, December, January It’s cold time u rights these months I am booked here so this is our This was the next question so we answered this as well Here, we have solved the first and second Which was the third question and the fourth question? In a month, here our month is January The month of December was here in December november january november december this month Most of the rights are booked less We have taken this out, now take out the week also if so then what do we have to do for that one more You will have to create a new column, this column’s name it should be right means right now I will give you If by writing data set dot head here Let me show you, let me run, now look, we have done this for the month It was created in the same way with the name Weak here Another column will have to be created for the next question So how can we solve this here We will make a week, if we look at it then it will be like a month we will create week in the same way as we created data set Inside this we will create another new column, this column We name it day because it is week which day is inside monday tuesday wednesday We have to justify this here so this is the data set and here I wrote de Now inside this we will write data set dot This is what we have called Start Date there is a column, we will take this and for this start date Inside, we convert every data into what We will give DT dot on weekdays here dot DT D Week means now it is converted into week day Now we will have to give labels in the week So I’ll write here the data label. Like you gave labels for the month, January It’s the first month here somehow What will we create first? Dictionary now this dictionary we have Let me just write has been created here this year now we will create this dictionary if If there is zero written anywhere, it means Monday happens okay so here I took the p label Zero if you are written zero anywhere If you see any calculus then we will take it here We will consider Monday in the same way If it is written here ‘one’ it means that It is Tuesday so I would write it here Tuesday T ues ok next one is yours If it is written ‘to’ somewhere then put a colon And two means your Wednesday is just like this in this way if there is three then plan t means thursday so i write t h y r then Later on you will keep writing for everyone in the same manner If you keep making it four then it will mean Friday to fo colon Friday then comma f then kallan that is saturday then comma six kallan and we will write it here Sunday what has happened to us this is with us This label of the dictionary was given by us I have made it here, ok now what is the next thing to do Now the next task is to Inside we have to look at the column named Day So here I write the day and then equals to data set and within it we people We will put D inside this day column. the name of the pass column is na so let me just right this yer d let me just correct this and right this to d okay ya by name so We have to create a column, after that here p will map this to the label so dot map and here I will write day Why are you mapping underscore labels because Look here toy day we have to call people day We have to create a column from this now inside this is that means if it is written two then it must be wednesday If it is written five then it must be Saturday We need it to map both of them I have to do this so I wrote here dot loop And inside this we pass the day label to let’s run this and see after this it is showing certain error let’s just check what is the error here so I am saying it here if day label is not defined then We have defined here zero than monday then one comma tuesday th 4 saturday and Sunday right after that there’s the bracket here Let us take a look at it properly ok here is the data label there is a mistake in the name Here we wrote data label and here we wrote is labeled D so calling him a wrong person let’s do the work, let’s do the day label Now the error has been removed from here, the spelling is fine Due to mistake, let us write it here now. Let’s type data set dot head and see it running Now let’s see another new column 1 January 2016 has arrived to you which day was it on 2nd so it was Friday by the way So what can we do here in an easy way now we will be able to plot this I want to know which day of the week it is The day when the most Ober Rights books were available it happens on Monday it happens on Tuesday if it is thursday then which day is it so now what do we have to do for this I will have to code, I will write day here Underscore label equals to data set dot let me explain don’t be worried at all that this what are you just writing code to me Let me focus a little on writing after That’s the line of code I’m going to explain to you counts okay after that we will be here I will write SA D bar plot first I will take the code then I will explain each and every line to you guy x ictu day We will put the under label then dot here What do we need in index comma or axis People need day labels writing here day under the score label okay i’ll write once I take it and make a graph after that one line in Everything will be understood after that what we have to Right here then it will be then after it will be plt dt x label and x access us guys who are into label want to give in t is day and why access If I want to give you a label I will turn around and put it on my face I will write and we will write here ok once i run this code I am showing by doing so i am writing here count let’s just run this okay what I mean, I am just explaining it to you right now I am looking at each line of code, this day label We had created Monday Tuesday for this who wanted to count that now i like this I want to know how many rights are there on Monday The book is being booked right so now I am here If I go and see, I will know here Got approximately 60 rights every Monday If it is being booked then the graph here shows 60 He was able to come because we counted If you could find it, that’s why I posted it here Write the line ta set value count so that here But we should get the count in the axis Now after this here we are making beer So de label in x access and va access I also put the de label mess here In access you have de and wa in access If you wanted to write the count then you can see it here ho in bar graph in x access your It is written nearby ‘Day’ and it is written here here is the count now if you look here then here Friday is such a day where most What do people do on Fridays in most weeks? let’s book cabs because It is obvious that our Friday is over Office hours are over, after that weekend starts Saturday and Sunday go by, so here it’s Friday It is the day when people are most What do you do to book more cabs? So we got this data from here And this question was now the fifth question We have also answered which weekday is it? There is a day in which the most people book so that is the friday On this day people book u the most now In the same way, which is the least day on which Obviously people book less during the day Sunday is Saturday Sunday to us getting to see why Because here on Saturday and Sunday What happens when there are holidays, people Most of the users do not book due to lack of time on there home so Most of the questions have been solved First was which category so business category for which purpose so the purpose of the meeting what time is it used for people Most Ubers are booked during the afternoon In which month people are most excited for time? Book fewer Ubers during winters that is november december january fifth question At what time, in which week, such a day would come This is the day when there is maximum overbooking So now on Fridays we will get this I want to find out how many miles I would normally need to travel or how many kilometers do people have to travel and you use a car, let’s say We need to find out, here If I have to go 5 km then people will you overbook if you accept from here I have to go 1 km so will the people over Will you book it or will you go on foot? All this will be taken by some other transportation Now we have to figure out things Miles So now let’s discuss it we will start alright so now our miles This is the column with the last question, we will now If people explore then I will provide the data here Let me write set dot head once, now here But look at these miles, these are different miles yes right someone u have booked 5 miles to go For some it is 4.8, some it is 63.7, so different miles If there is any, what will we do here? People have booked here for miles We will make a box plot of this why make a plot because you have Like here you have boxes, how many? How far did maximum people go for miles yes we people need to know this that’s why we Here I will create a box plot once I will make a box plot and show you easily you will understand why i am here Pay attention while making the box plot so sns dot box plot and then we Here we will write the data set and the name of the data set Which columns are inside, the name of this column is We have miles right so miles this column I’m running this here and The anthesis is not closed, ok here The bracket is not closed properly, you should have run it Now see what is the benefit of making this The box plot of this ride of ours okay this is showing you approximation 25 from zero means it is approximately 20 from zero Most of the people here for kilometers You have booked it, after that gradually you You will see as many plots as you can see here This is yours for up to 175 miles The graph has been prepared, meaning from zero This entire 175 mile stretch was visible till here How many miles does maximum people travel in Uber? to go to that that is near about 175 Now what do I have to do to travel miles? This all happened very quickly and very quickly I just want to see this for 100 miles I want to see even 100 miles till when people how much do you want to book then what should i write here sna dot box plot and then here we go will write the data set from within this data set Which column do we need? the miles column from inside so here I am I will write to you Miles okay now here Every mile I want to see is 100 I want to see the inside of the mile from him There shouldn’t be much so I am here I will write 100 100 miles and here I am I will write it down Miles, okay I will write it here closes the brackets properly now let’s run it is showing certain What is the error saying int object is not true subscribe can you see it here issue is coming sns2 plot we wrote ok Here is our data set from within this So here we have to take data set data Inside the set there is another data set of ours. From inside we will take miles to be miles we should go less than 100 miles around I have to bring people here so let me just do here one thing close the bracket here Let’s give it to you and then here’s a 100 and it’s miles let’s just run the code now okay Now it is clear here, so the first one was Miles inside the data set data set here And how many miles are within 100 miles? We want to see P here under 100 here If you look, you can go up to about 80. It has been saying that from zero to 80 here we are you can see it here as well if you If you look, people from 20 to 30 miles around more are going after that you will see 50 It is blank from 60 to 70 miles then from 80 to 70 miles Booking a Pay Cap here to go Now this is the way I want to look at it Now, I can even analyse that Look here, this is the area number 40 here But I feel very much that people Miles here so many miles 40 miles Many people book a camp here to go there. so here we go what do we do now If we look separately for 40 miles I will write here sns dot box You can make a plot or dis-plot here I will also tell you what is dis plot I will make it and show it to you will show with density okay so right now I what i can do is this is the same our code I wrote to him, what am I doing here? I am copying let me just control A Control A Control C Go here control and do copy paste now this is you If you see, this was for 100, what I can do is i can do this for 40 so now you If you look here, look here for 40 If you look at it you will see a graph like this Getting to know that I mean that most people go 5-10 miles there Later here is the graph of this method here This is what I see in the density plot if If I make it then I can see it in an easy way How many miles will it go or what is the density What is a plot? I can plot it once I take it so that I can give you a better look How to understand what is a dist plot This works, the density will be visible there SS dot dist plot and inside it is our The data set is inside this data set Data set And we will take it within 40 miles to show up because people go till there If you are going too far then you should have written it here Are Miles end bracket close less than 40 miles for less than 40 and let’s write here miles okay We can write the bracket close here as well after miles put the proper bracket here let’s close it okay and then after this if you run then there is a problem with parents dist dot dist plot data set was data set data start here proper here There is a bracket then miles was after this Less than that, I think of the data set here. Our column is not closed properly It has happened from here, it has not been closed here right here after 40 we People let me just write this here 40 bracket Close, now it has come to us, so what is the meaning of this dis plot, look You can see the density here right now You can easily analyze it here and tell me It is possible that in this graph of ours To travel four to five miles, people use the most You can also get a slot worth Rs 10 from here If you want to see then go to see the peak hike If you are getting it then it means from zero to 10 miles to go up to 10 miles People book the most for u and after this if we look then from 0 to 20 People book U even to travel miles but if they have to travel more than 40 miles If it happens then they don’t show that much interest if you want to go on for too long then this We have to find out the miles here which we have figured out that from row to 10 Most miles are as far as People go and do this from Ro to 20 Miles is where people prefer to go are by booking the u caps so this means The point here was that if we answer this question Answer now why did we choose this dis plot If you made this then the reason for making this dis plot is it was here look do you know the density it’s going through a curve, you can tell ho where is it and how much is it like we are from here If you see, from November to November 20, this is a very peak. in our graph this means 0 to 20 People spend the most money to travel miles that is to get around for example 10 mile 20 mile or 10 20 km if we consider but more than that if If you have to go then people here see you so much Obviously I don’t use it much Why are people using ‘R’ the most? are using it for business now If you are having a business meeting then look around The meetings are from 10 miles to 20 miles If they have to take distance then for that Who do they use, they are caps here so that’s about the other The answer which we have derived here I found out that u are the answer to the first question What was it, which category, business category For which purpose, for office and meeting purpose Then which cab is most available at what time? If you book then it is afternoon time In which month do you book the cheapest fare? Cabs are booked during winter time because There is snowfall in Paris, that is why this The month which was ours was January, November and December I use it less in a month then which week I am the most on the right side here Which is the most popular day on Friday? I use it a lot and the most on Sundays How many people book less caps till the last As for miles, from ro to a 20 miles If they have to go then they will go to R Cap. If you use it more then how do you use it the most many miles to people usually book to 0 to 20 miles so everything that we have here The question was given, we answered it properly make a graph in this way and put all the details here We have extracted the answers and this is our data This was our insight from this, here we So in this way we have taken it out here This project is completed that We extracted insights from every question I took out the visualization and used it for that question So this was our project Where data cleaning is missing Dealing with Values ​​in DateTime Formats Changing the column keeps creating new columns as and when the need arises Doing EDM visualization is quite something we People have got to learn from this project through so there was a lot in this project to learn how to do projects You have to complete the answers and get the insights I have to take it out so I hope you do it well You must have understood and if there is any other problem It seems that you did not understand some things You are definitely open for comments Please tell us by going to the comment box How did you like the project? How much did you understand? If you are able to complete the project then I will tell you about it I will wait for your feedback comments With this in mind, our work here is just to We do not end with just making a project people about this project that you Learn about it You want someone to take your project also give an overview so when you How deep should be your knowledge If you have it then you should also know how to show your work because at last our objective is Cracking interviews is a good job If you want to take it then please send your profile for that make it strong I did not understand, please tell me, we will meet Till then we will stay in some other video Data Curious and Keep Learning But Its Make sure to download the notes first There are some more practice questions in this Includes problems that you can solve yourself yes you will find its answer there Download the notes, see you next time Stay Curious and Keep Data in the Video Learning with this scale Data Science & Data on the Platform Premium courses in Analytics too are available which you can check out The Dai Scale website and mobile application But where you complete the detailed curriculum Lectures End to End Projects Live Doubt Classes Industry Recognised Certificate Off training as well as interview You will also get help for preparation the link is in the Description all right so let’s start This is today’s class where we are complete do We will take data of 10000 movies here and The special thing about this project is that Performing Exploratory Data Analysis That means ED, we learn this very well You will find it in today’s project and its Also you can work in any profile Data Scientist or Data Analyst Company even after I went in, the most The challenging thing that remains for you Data pre-processing happens i.e. Cleaning the data into the correct format arranging the data and then Extracting insights is the focus of today’s project Data cleaning pre-processing is also a It would be a great thing for us to understand What you can learn from this project Besides visualization many times we Reports have to be prepared and submitted to the company There are several bar graphs for that inside the charts in If all things are needed then this one But at the same time, this project that we will complete it in pythonanywhere.com I am going to explain in very easy language So whether you are a beginner or an intermediate level Or it may be in advanced level or any level You are in this project. Please include it in your CV. It will definitely add some weightage to your resume and this project is very basic and simple I will explain you in easy language But to start this project First you will find more on this channel of Dai Skill You will get projects like e-commerce There is a complete project of u data of the analysis This project of late is in which the machine Learning and NLP has been used in i Sales Analysis I am live youtube2 You will sit for three-four hours and complete a You will get up after making the project if it Maximum people comment yes live If you comment on the class then you will get my You will definitely find a youtube video from that On this we will complete the whole project If we complete it, then as many people as I am interested I am expecting that even if 500 students go and say yes in the comments If you write then I really like such live classes is to take such live classes where pay & sat end to end and in three to four hours A great project, we finished it Right so please tell me in the comments those who Would you be interested? Please write yes and tell me like More than 500 people commented yes in this We will definitely arrange such a class where I will give you a complete I will get the project done right so let’s start For now let’s do this project of ours Is In total three rounds are conducted Right, now you have come here to learn a skill. The most important thing for you is You should know that when you are in the company If you go for the actual interview then how many There will be rounds and what will happen in that round So the round which is number one is mostly What do companies do even if you share your data? Analyst Data Scientist Business Analyst Go for any position in most companies What this does in round one is that you get a An assignment or a project that’s mailed to you It will be sent to you within 24 to 48 hours time is given if you complete it I will send you your first round If your assignment is completed If you are shortlisted then you will have to appear for technical The call comes for the round and then after that Round three is your HR round, so this The assignment we get in round one Not in the same way that I am today I am going to get the project done for you so that your First of all let there be a practice right what the company does in the assignment such as Will give you some documentation first Company history will be provided That It has two co-founders as you can see Reed Hastings is looking at the screen And Mark, these two are basically its co-founders is when it started what happened to netflix’s once that its The founders have experienced that if people are late the DVD They charge extra for returning the money starts becoming so then they thought that Why don’t we send this DVD through mail? If we start delivering to people’s homes Whoever wanted the DVD could go What did you do? The photo you are seeing is from 2007 This is the photo of when the website was created It is available in more than including India right now if we talk netflix.in is this it is profitable with this Its profit now is $2.4 billion So this has become a very big company. 283 Its paid membership is in millions It has 283 million subscribers and It is available for more than 190 rupees and in netflix’s which you can also see on the map here are in every corner of the world What kind of things do you like and according to that If it starts showing us the result here then In the world That we understand customer behavior and patterns now you have been given this situation In the assignment that let’s assume you have data Working within this company in a driven role You have a data set of 9000 Now you can find 5 of 10000 movies here questions are given, from that data set you will get this You have to solve five questions and then answer them First, I’ll tell you this data set I will show you what question is solved after that If you want to discuss this then please do it here The data set you are looking at is a heavy We have data from around 9 to 10000 there are movies here so if we If people watch then around 9000 to 10000 movies this something data is given to us now Which movie was released on which date? what was the name of that movie what was the overview How popular was that movie and how many votes did it get? The count was found of how many people gave their average vote Which genre was that movie and URL link of the movie poster I have given every if related to the movie Formation is given like for example any one movie is spiderman right so this is spiderman Which genre is it and how popular is it? People came to see this whole information is available to you in this given in the data now you can contact the company which what are you expecting If you have to solve the question then first of all You have to tell which genre of this The movie which is he has to tell us which seconds are these There are genres that most people have Liked the one with the most votes It can either be a comedy or an action thriller C is such a genre that people like it We have to tell you the third question, which one? This is a movie which is most popular What is Milli and its genera? Fourth question which is that movie which has the least Popular Milli and what is her generation Fifth The question is which is that movie which In which year were the most films made? most released so until this information By giving you the answer to the questions If we have to give the right then now we will answer this question We will solve it with the help of Python, so let us People directly open their Jupiter How to Notebook Jupyter Notebook Anaconda If you don’t know how to install it Link to it in the description box below I have placed it so that you can easily If you can install it then let’s go ahead and Let’s start this project alright So before starting the project there is one more important thing like this right now There are five questions in the project, we will solve it but apart from that The libraries that are in interviews Python like measured panda mat plot lip c Bun and Plotly so related to this 25 I have prepared a set of practice questions for you. has been prepared so that there You can go and practice more questions So where are these practice questions now? You will get The Eye Scale for this You have to go to the website and open it as soon as You will see the website here, after that You have the option to explore courses here it will be seen that we will go simply and whatever is ours There is an option to explore courses by going to this We will click here for the free category We will select the course which is this In this particular website, The Eye Skill On the platform, you will get free data science and Data analyst courses are also available From where you can start your studies Where you will find more video lectures like Python Machine Learning SQL Excel and more You will get all these things like projects etc. Will go with video lectures along with notes and also with the code files now like You can get this free data science course here I will go and click, after this you will see above The option to login and register will appear if you If you have visited the website before, you You can log in directly or if you If you are coming for the first time then you can simply come here What can I do? I can register. So whatever your mobile number is, you can enter it here You will enter the password that you have created yes they will put it after that you will do it successfully Like you will be logged in here in this way You will be able to see an interface dashboard. Here you will get the option to explore courses And here you will also get the option to enroll a course So we are already here in this free course Enrolled so we are here to Enroll Courses I will go and read the free course which is here We will go to the free course as soon as we After this, we will select the first one which this is yours right here you’ll find python By doing practice questions, you can Simply solve this Python practice questions You will click and then you will find it here will go to python’s practice questions and This arrow is visible here, from here you can You can download this then simply Here you have to click on this arrow, this is your It will be downloaded after downloading Here you will get a complete answer of 25 questions If you get the set then I am hospital If it is full then you must download it. Take it and you will find the link below find it in description box So first of all we will look at our system we will go and the anaconda navigator which is you will open it here if you open it If we do something like this then we will The interface will be visible and here we will The option for Jupyter Notebook Latch comes here You will see a launch button at the bottom like You will then go to this launch button and click on it Whichever browser you use, mola firefox.exe In the decryption box I once again Let me tell you that the notes and the data set It is available in the description box below Check it there, I have already done it for you. If it is kept put then as soon as You will go to the description box to download The option will come and you will find it there So now we had this CSP file here What have we done with our data here? I have uploaded it on my site, now we have people here You will need a new Jupyter Notebook of your own to make it we will go to new here python3 iva null we will click on it After that this Jupyter notebook is ours It has been opened now you can see it here You may see untitled in this, whatever you I want to keep a name I want to keep a name hoon movie data analysis In this, the data has to be cleaned first There will be a lot of steps so we Here we will import some libraries. Pi Libraries for Mathematical Operations Pandas library for cleaning data We have a lot of graphs here too. If you make it then we will use it here I will do Matte Plot Lip Library and Also we will use it here seaborn library right so this What should libraries do first? If you have to import then first of all Whatever work we have to do here, we will do it here If you want to import libraries then first First, we will import the libraries here. We will start importing Nam Pay Edge NP NP is its alias then in the same manner import panda as pd than import mat plot lip dot pi plot s p lt her Later we will import sea bun also Import se ban as SNS then this is as much as The first work was done on essential libraries Now we have the right to import this Here our next step is which We have to perform as much as we can with the data We have ma m dbcp2 CSV This is our CSV file, its The name is my movie so if you write my If you look at the keyboard, it is above the caps lock The tab button appears as soon as you press it If you do it, it will automatically show you the name of the file now what do I want here We will use the line terminator for this Meaning one row should come and then the next row should come second row then third row in the next line In this way we can understand systematic data If you want it here then we will write the line here we’ll use the terminator so that we have We provide data here in a clean and nice way If people see it, I will write it here am the line terminator so that after a row The line for the next row changes to equals two So for the next row we have to change the line then the method to change the line in the next row is If we want to go to a new row then we write so that we can go to the next new row So we have written this here, now this data the set has arrived now in this data we Which are the first five days? Five data If you want to see it then we have written here The number of columns you have is given here The first column is the release date On which date is the movie released? After that what is the title of that movie overview what was in that movie I have given a brief overview of that movie How popular was that movie and how many votes did it get? How many average votes did that movie get? Count and the original of the movie that was made what was the language, it is given which It was a Janar movie and the poster of that movie its url link is given so now If you look here, this is the first movie. like it is shown here It was released on 15 December 202021 spiderman nove home ye movie ka jo The overview is written here How much popularity did he get after that, how many votes did he get Count Mille the actual one who made this movie His original language was English and this Which genre was the movie based on, action adventure Science fiction and the poster of this movie If the URL is given then this is the complete Now, we have the data that is given to us. If we want to understand that every Here we have a column given below What data type was inside it? There is no missing value in the data All these things are not null values, now we People want to check it here. Check it We already have a function to do this which we call ff.in now d.in As soon as you apply it here you will You will get the basic information first The information you are getting is that this How many data sets do you have in total? There are movies 9827 movies are given here now you can watch look at every like column then release What is the data type of the date here? Data is of object type i.e. 2021 12 The month means December and the date is 22nd The data that we have is this date We have its data type is object That means if the data is of string type then The first thing we need to understand is that we need to change its format in which place should we use this instead of string will have to change because there is a date so we This will change to proper date-time format The first thing I saw here was that Now let’s see another one, we’ll have to do this thing The title here is like a movie, the kings man so its title is definitely Data must be of string type right in the overview also here the string then this is also object type data After this, this is numeric, that is Floating point data is followed by integer If the data is floating point data then this The language is English, it is obvious if it is string data then this is also correct Object data is now as many data as is inside it These are also genres, object types here there is data of and after this this is the URL of The link is given, this is also object type data then all other things are ok but one The first thing we need to do is Release date is its data type we will have to change this instead of the object Converting people to date-time format The first task now is to find out if there is any If there is any missing value then we can see here You can find that all the records are here Any value is available missing here There is no null means there is no null in this data We don’t have the right to value here This is clean data, there are no null values Whatever null values ​​we have now here We do not have it so whatever operations are going on in future We will continue to clean this data further To simplify, let us focus on that If it will happen right then till here we will tell you this People have become clear now see how much they used to be before This is our question, solve this question there are a lot of questions on the genre of acting so we If you look at the genre of movies here, there are many There are different types of genres such as Spiderman movie its genre is action adventure science fiction but here i am If I watch another movie, Kings Man then this The genre is action adventure thriller One To Aise I have given different genres here If you look at the first five generations here Which genres do I want in this movie? so here I will write df our data The name of the frame is our column inside it Its name is genre and within this genre I will put my head here, that is, my If you only want to see the first five you can click here You can see different types of genres given It is an animation action comedy family fantasy thriller if i get my head out of here I am here, no matter how many people are there here You will get to see all these things in different ways genres but i am just getting started I only wanted to see five so I posted here It is written head right so this is generas now genre One thing that I need to understand is this Look, the first genre is written action, some attention Give me the right here, what I am telling you yes this is a little important matter, this data pre The processing that you will learn now is very This is an important step for even the company Go inside to work, this thing will help you You have to watch this step very carefully Look right, what is this? Action is written here. Just after one birth what did you feel comma then there is a space given here After this I have written the second generation in a different colour I have made it, look what action is going on again comma then after that look here is a white The space that I am showing in blue is a There is white space and then it is written second here genre adventure then comma then watch There is space and then there is science fiction in everything this is the same thing look here it is an animation put a comma then the next one is a comedy before that If there is space then always look here to see space If you get it for me then I will understand this It is being said that this genre column is in this A genre is written, there is a comma and then this white If there is space then it is possible that in the future we will How can I remove this white space also? This data pre-processing will be removed Whatever happens I will teach you to move ahead right There are two works so far, I have seen the first one The work needs to be brought in date-time format We need the release date and this other thing too It is possible later if the requirement arises So whatever white space we have We may have to delete this right twice I understand this even now, this is for us too It is a must watch movie, let’s suppose take spiderman a column okay is this again Is Spiderman being repeated again? Is there any movie or data duplicate? There is a lot to check here It is important that if any data is repeated somewhere If it is not there or it is not a duplicate then now Let’s check if any value To check if it is a duplicate or not function with da dot duplicated name for It happens that we will apply it and put a dot sum whether there are any duplicate values ​​or not here comes zero if i don’t apply even So let’s see what happens if I don’t apply any balance look falls falls falls come This means that any value if Not a duplicate means false if the value If it was duplicated you would have seen it here But this data does not have any value It is not a duplicate, that means every movie which is here There are 9827 movies here and every movie that is What is that, any movie is unique it is not a duplicate so as soon as we put the dot If we apply the sum then the value here will be zero This means any movie here is duplicate now what is the next thing to do so next The work is to do that whatever data we have It is given first of all the basic Perform statistics and see why look because as you look here you vote If there is a count then what was the maximum vote received? What was the minimum vote and what was the average vote? Right so what was the maximum and the minimum is now here If it is popular then how much was its maximum popularity What was the minimum and what was the average popularity? 25 How popular was it at 75? How popular was it? If we have to take all the things to the basics if so then we have describe name for it function is given by but it can be Statistics in the data which is numerical now you For example, suppose here is the title of the movie Spiderman, here are some statistics Statistics will not be applied with numbers If it seems so then we have a description for it There is a function named, by using this one Here we see the basics that what things are given here so here I will write df9 27 is given here because The total number of records you have is 9827 total count right now let me talk If we talk about popularity then average popularity of any movie Is 4.32 minimum popular is 13 and maximum It is popular 5083 This is how the movie got vote count I have received the average vote, I have received the vote count 1392 Minimum 0 votes received and maximum Joe is he is 3177 This is how you have to see the average of the votes So here is the minimum, if you look at it I have got zero votes and you will see maximum So if we get 10 then it is an average on an average. We understand basic statistics here Now whatever points we have earned till here comes We have seen all those points in one place I would write down here and keep my jaw down. I have all these points so far What things did I get to know? The first thing I did right now was What we have to do is this, this release The second thing is to change the format of the date It is possible that in the future, whatever genre it was There was a white space in between, it had to be removed Now I can’t see it here, it’s so big data is given but in this data we Will we keep only those things which are useful to us? He is of no use, so I will remove him from here what is not useful here then here By title we mean overview We have nothing to do with that movie We have no objective yet after knowing about it If not, this column will be of no use to us The language of the movie is in English Made in Hindi Made in any other language We have nothing to do with that, why? No, because the question that was asked of us There is no question of language in it Otherwise, remove the question that is not there. Because you will only ever get so much data Even if you go inside the company, there will be a lot of You will get the data in bulk, it is up to you The company should only provide you with what it is asking of you. keep the data to yourself because you are If you move forward with all the data then you will make mistakes You will not get accurate results what will we do with this data It is a useful thing for us, we will keep it if we keep eliminating him then what is the use I understood two things that these two columns has nothing to do with it eliminate it another one here is poster url now movie what is the poster of it, we have nothing to do with it we don’t have to give it because the interview I have asked a question, there is no mention of it in it There is no poster URL or language So what do we say about these three columns of the overview? We can do these three columns So can I simply delete it here? We will remove these three columns will bring the release date in the correct format and There may be white space in the genre in the future Who has to remove this work, whose work do we have to do data processing inside pre processing Properly arranged data inside We have to arrange it from here Right, so all these tasks that I told you about Let’s note down all these tasks in one place ma’am, make a summary and note it down what is needed it is needed because In the future this file could be used by someone else Look at the recruit or any other person See, he should understand your work. Cleanliness should be visible, everybody should coat It takes but where should I give the comment? You have to write the summary in the correct way so that even if any recruiter is looking for you If he opens the code file and looks at it then he will find that yes it can be done in proper and systematic way It is not just an interview that comes from By going and telling that my strong The points are that I am very organized or I like very clean work, so to speak No one will believe you, you should know how to show it So we write down all the summaries on the second page This summary is also important because today You may be working on this project If you open this file again after 202 days then If you don’t get confused yourself, then the record will be there Then you will understand it automatically, so let’s do one thing Whatever work I have to do till now, I have to do it If you note down the place then the basic These are the summary points, we have jotted down in one place we have written that we have a data Frame having 9827 roses and nine columns That is done. In our data set, any There are no duplicate or non-existent values ​​now But the work that needs to be done is this release date This is a column, we need it in date time format I have to bring three things and remove them Overview Original language poster URL: All three Columns need to be dropped and then vote We want to make average a better category people and all this white space I want to remove it right so we have to simply Right down here, whatever things we find here Now we have to do the next step which is our first task They will do the same thing, I will do D.Ed once Let’s take a look at the data before writing the head This is the release date and the question I have what is that related to the date given to The question is given that in which year the most More movies have been filmed and released in date time but even in this i don’t what does ko just mean to me just ear it means 2021 22 21 it means so I have nothing to do with its month So I have nothing to do with its date Who has anything to do with the year, we what will you do in this release date only year If we don’t need the rest of the things then we will keep it We will remove that also then how will you clean it How will you pre-process the data Let us begin to understand this now So the first thing that we need to do here df is the name of our data frame Inside this our column name is Release Date So we write the release date here and After this we have to change its type date In time format, here we have PD i.e. that we will use the pandas library and this will change to date in time format So I wrote here date time df And the name of our column inside this is Write to us here If you have to, then the name of the column is Release so let me just write this here release date right this is for us here You have to use pay and then the bracket Simply close it and then click here will write print DF After this we will be released here date bracket close and now its data type which is D type, we will write data here Let’s type check if it has changed or not If you run the change then the earlier data type was what we had of object type Tha Here We Can See release date which was delayed the type was that of the object type now this what did we change it into we changed it Look at the date-time format now Data type: This is what we have printed DF release and its data type i.e. D I checked the data type by writing the types, so now It is in date time format But now what are we to do here? just want to keep year 2021 22 like this We don’t need any month so now we will do it If you convert then write for it will have to do d a our column name is release date right and inside it equals to da i type the whole thing in a single code first I will take it after that I will give you one by one I will explain it by doing this so you don’t need to green about what is happening right i I will explain this entire project to you line by line. you will understand that that is my hope for you right So I write it first and then after I will explain every line that is released date and dot d types what is written I’ll explain it to you a little bit Look, first of all we have released this Date is our column, what do we do inside it If you want only year then click here that’s why i wrote release date dt year now Whatever we will get, we will get only year We have the right and if I have the data type If you want to check then now there is only year i.e. If 2021, 2022, 2024 are this type of years, then this What type of data will it be now? We have data of integer type so now i am going to put this code here I am going for a run and it is showing certain error what is the error ok error it is given here here we have a comma double inverted comma which we put single inverted comma He did not close it, now look here what is the data type integer now i let me go here now I’ll type df2 and Let’s see whether what we wanted happened or not otherwise it would have been done by writing DED head We wanted to know how it was coming here earlier Look, it was coming with the full date written 1512 2021 But now, after what we’ve done, If it is coming with just the year written then this year is coming 2021, 22, 21 are now coming according to the year Now that this year is written, its data what is the type integer type data Once it was typed, this was the work we had to do We have done a lot of work on this with the release date well done right now what is the next step to do so this is the first Done and dusted with a working release date now this The overview column will be removed from the original We will remove the language column and the poster We will remove the column containing the URL, so let’s go right Let’s go ahead and perform this operation. it’s alright so let’s proceed with the Next step: Here we first write Dropping the columns like headings So we have already marked those columns which are not useful decided now we have to drop that columns right so I’m gonna mark this down Now let me write down our seconds here Step 1: Which columns do we want to delete? If you want then I can name the columns here I am making a list in which I will get everything I don’t need any columns, I will name those columns If I keep posting then this overview column I don’t need it so I’m here Removing the column with pay overview I want to so I am writing the name of the Columns which I don’t want in that data set On the right, first select the overview column We don’t need it so we are here for the overview Let us give you which column is not required We want the one in original language There is a column, we don’t need that either, so I think The name of this column is Original Language Write So here we write O must be in The Capital Original Original Underscore Language In right language the L is in capital this is the original language we don’t know this one should inside column is poster url right this We also don’t need it so I am Writing Here Poster End underscore u a l so this is as many columns as We don’t need to make this a list Now we are giving lakhs of rupees here, all these If we want to delete the columns then click on delete button Our data frame is named df After this we will use the drop function here. We will use and whatever columns I have written here Those who have already been kept in this list I have to remove that, what am I doing here I am passing so I will write here I am calling the number of columns I need to delete There is already a list of comma columns inside it one has access to the forest and it is as many There are columns here in all three columns I want this data set of mine permanently get out of here i have nothing to do with it If not, I will write it here in place Equal to 2 right now after this DED here columns, let’s run here now Look what the columns are showing us here We did not need these three Columns not wanted Overview Poster URL The original language is now removed but But once we get our data back Let’s see and see if it is really removed or not Otherwise I wrote back here D.Ed Head Now you can see that these three There were columns, they have been removed, now only release Date Title Popular Vote Count Vote Average and Only Janras is coming, rest these three are columns We took away those things which were of no use to us what did you do successfully, eliminated it Now here’s another thing for us It is very important to calculate the vote average Look, many times we have such scenarios that we are given a criteria Like for example when you were in school When we study then this used to happen that also from 90 to 90 marks Whoever comes will get A grade, whoever is above 80 I will bring it up to 90 and give it B grade Whatever you get, let’s assume it will bring 70 to 80 He will get C, such was the criteria There used to be such a grading system in school In the same manner as I vote here I will talk to you if there is any such movie who got more than seven average votes If yes then it might be a popular movie There is a movie which has very low rating If we have got it then we can tell him that the movie What it is is an average movie, it could be any movie it is below average and there could be any other movie which What if it has not become popular at all? Whatever numbers are there, we will do it instead of numbers The label will give you the right if a movie scores 8.3 This means this is a popular movie, 88.1 I mean it is a popular movie but if a movie It is not popular, like say 6.3 right so we can tag it as below It is an average movie so here we are going to tell you a We will make a criteria and according to that The numbers here will be replaced with because seeing the number 8.3 someone might I don’t understand, things get tough But if it is written here Spiderman If it is a popular movie then you can immediately understand the word popular If it comes in then here we have the criteria create and label this vote average From which the numbers will be removed and we will use labels in their place We will add a total of four labels Which four labels will be the first popular ones? Movie’s below average Movie’s below average of movies and then of not popular movies We will put this total which will have four labels We will give here this weight average column So how to do this work inside, let’s see this let’s see alright so first of all we here Let’s write down what we need to do Here I will select mark down and write I am saying that we have to category is the average Vote column right and for this we have four labels as we decided that we are going to Make four labels popular average below average And it’s not popular to do this job anymore What we will do first is create a function Now we will create category with column name what will happen in this function then I will be the first one I am writing every line of code here and after that I will tell you definitely each and I will explain every word here So here we create a user defined function whose name is category is column Right, in which category should we place this? If you want to keep it then we will name it here keeping category column name ok now This is a user defined function because we Here you can implement this function yourself Now what we are doing is this category is column name Creating user defined functions from this I need to put the data set inside so I Another variable named create here now what will happen in this age Here ultimately this is the complete data set We have no minimum value in it there will be some value which will be maximum right and 25 will come in between 50 and 75 of this Accordingly we will give labels that which is most The maximum he will get is the popular label You will get it then let’s suppose if he is at 50 Like on and around 50 to 75 then He will get the title of average if he scores on 50 And if it is around 25 then pay his average bill You will get the title of average and if you score more than 25 If it lies between the minimum then it should not be I will get the label of popular right so that’s why I Here I am creating a variable named edges now inside this da is our data frame Inside this we will pass the column dot We will put the describe function here and Describe what we need inside it Firstly, I am making it for the minimum First, we are making the minimum here so i am writing here minimum ok next For whom will we make DF here? In the same manner we will write DF call here. and now we will create dot describe and Why should we use describe function is 25 for then I have to write here 25 But this is a very new thing so far We did this work in projects It is not implemented that any text We give the data to some number, data to people what to do to convert to labels so this is a very new thing which you guys are watching right now Wright is learning inside the project In the same manner we will write DA here column then dot describe function For dot describe then after 50 per here we will write it so we have to right it here 50 but okay and then we have to close the bracket same manner same thing as here It is written, you should type it here I’m just simply coping with this thing so that I want to have to write this again and again and it will save my time so thatchi guys are practicing for the first time then you must have to write those things Right because the more you write and code the more you will the better things work in your mind I’ll fit in right so here we have to close the bracket okay so this is us guys what did our name Ages do here This was a user defined function, we called it made Now after this we have a variable named edges what do we have to do now after making this df is data frame inside it we have Out of the number of columns, which column If you want to do categorization then I am writing here df1 dot and here the cut function this cut What does a function do in categorization It helps us to define what we want to label no it helps to give it a label Because what was there before, all these numbers before Now if we want to label the numbers then its So this is the function we are writing here If this cut helps in categorization then Here we simply tell you what’s next This is the step, we will proceed here so here we have to write pd dot cut after that We will put the data frame and in the data frame Inside our column, we will We have kept it fixed in ages, right, at 25, 50 Now in this we will give the labels right so now Here I wrote about ages and ages Accordingly we will provide labels here equals to labels comma right here now The labels which we have made separately for this We will pay here and after that no one can if it has duplicate values ​​or This is not the case for us if any If the value is duplicate, it should be dropped We don’t want any duplicate values If I survive inside this then what am I doing here I am dropping the duplicates and After that what will you do to return DA Now look, this is just a function that has been created We have created a separate user defined function so that when we need this function We will call this function whenever needed. So what did I do differently here? The user has created a user defined function def keyword to create a defined function What is the name of this function used for? We have named this category as this Now inside this, in the argument, we have placed Three things pass df means our data frame Columns Whatever column we use this for According to that we would like to label it can it be possible let’s suppose further Let me label some other column So what did I do when I needed it I have created the function whenever needed I will use it when I need it, so right now I just placed the calls here right now we Next, we will specify the name of the column What is the name of the column you will insert, vote average and The labels that we have to give, we also give them separately You will create it but on which category you will label it If you want to give, we have made it for you If we have minimum age then give it to him should the label let’s suppose it’s not popular if that If it is between 25 and 50 then it means below Average if it is at 50 and around 75 Let’s assume that the average and maximum are Popular in this way let’s suppose we I have thought about it, right? Now after this, what we have done Write this line of code to create this data frame Whatever your column will be in cut function It will help in categorization and this we made the ages, we passed it and These are the labels that we will use in the future Look, we have not written it anywhere in our code We have not written anywhere that average popular is ahead I will go and write it now and if there is any duplicate if it is there then we have to drop it, after that we what will people do, they will return this right to the data frame so now we are here Now what label do we want to give here We will start making pay labels, the first label let’s suppose i am writing here not underscore popular this is my first label Right I am creating a second label called Let’s Suppose below average that is my second label third Here we are making the label of average We are making the fourth label of Popular Right, so we created this label here. Now if you guys order this label If you see, the orders here are completely systematic Look, we have kept it, it was minimum so it was not popular Then there was a round of 25 to 50, so below average and if it is from 50 to 75 then average and If it is maximum then popular right we have said this Accordingly, the label has been created here Now what to do is now this function that we have Here we have created the category is column This function by name, the number of steps it had You are seeing that block, right? In this, only We have created the function now I Now I want to call this function I want to use it whenever I If I need to use it then I will call this function just like we name a person after him If you want to call someone, then call his name call me right sambalpuri call me swati Right in the same manner we used this function It is named category is column by taking its name Now we’re going to call this so let’s name it Here we mention the function The name of our category is Category is under Score column now inside it look at the data frame here now when any If you call the function then here you Three arguments have been given now these three You have to pass your arguments here If you read it, the first argument will be our DA Let’s pass this one now, just here Earlier, when we created the function, we only I had left the call in writing but now which one? If you want to function in column then vote If you want to do it in average then now I have to Here you will have to give the name of the column and what is the name of the column vote average right so i have to write it here vote underscore Average is okay, now we have given it a name now what to do next what to do next Labels These are the labels we created here this one this one label right this one Create labels and pass these labels here If you are doing it then I will simply write it here I will give you the labels, write the labels here Ok so this is it, calling the function now Here when you call this function I am writing DF and then this vote This is our column with the average. Now I’m going to put I want to check if this thing has happened or not it hasn’t happened right so what do we have to do Vote average and how many unique votes are there in it These are the values, let us look at them now So here I have written unique now let’s just run this code it is showing certain error let’s say category is column is not defined So what did we do wrong here? Look here the spelling of category is different and when we are calling then the category is the spelling of is different here it is e and here it is s Pay has come because what is it giving us Because of this it is giving us error here let’s do one thing i will go and get it I will do it let’s suppose right now here I will run this but it is showing some error lets say Just check the minimum amount and tell me here it seems there is an error ok so ok look here It’s an error, it’s such a small mistake, it’s minimal it is written the bracket is closed after that we What are singles closing here inverted commas so this is our mistake Let’s correct this mistake brother, remove it Now let’s try running it, now anyone There was no error, now the proper result has come Now you will see that there are unique values ​​here. What has become popular below average Average and not popular now this is what I call I n the data frame we have the change I am writing to see if it is true or not. dead head run and here we are Getting the results we wanted to vote for Look at the average, what came first We’re getting the numbers here you can see Right first here the number comes in the vote average was 8.3 8.1 6.3 now we have changed this thing and here we are getting the labels Right, this was a very important aspect Anytime you do data cleaning before We are currently processing So whenever you do such pre-processing then In this way a numerical data is given labels. converting into this was a new thing Data Prep for Learning in Project inside the processing step so I hope that If it is clear to you then inside We did the important work that we had to do I have done it now I want to see that brother How many movies got the tag of popular? There is so much of a movie which is considered average How many movies have got the tag? It has got the tag of average and how many such movies is the one which has got the tag of not popular right So let’s check how many movies are there In this we will write it to check it df what is the name of our column what is the name of the column name is vote underscore average right vote Underscore Average now includes value counts If we apply it then whatever we If you want to do something, you can do it here Two value counts now look you have it Not popular among the total movies There are movies There are 2467 popular movies 2450 is the average 2412 and below average is 2398 so this is us People now know a rough estimate If you look here then this will be your Right now those movies which are not even popular There’s no use in showing it to people Why right because there is no movie The movies are of no use to him There is no use of showing in recommendations the movie which is not running at all and people are watching it Why are they not liking it and recommending it? will do you right so in the same manner to me now It was found out that the not popular movies which it is not that special but our data Most of the movies are of this type which It is not popular right now what should we do As many likes as people get here, if we have any of these now There are duplicate values ​​or any non-values Is it necessary to remove it in any particular row If so, we will write about it here. Ded drop A and after that we people I have to remove it permanently so what am I to have right in place equals to true Because I don’t want these things forever I just want to have this data remove this permanently now after this you You have to confirm whether it is removed or not then click on dot we will write is a and put a dot some So now you will know, now you will know from here that all the non-values ​​etc. that were there in it All that has become 0g here, that means now this It has been removed properly, right, this was it Basically this is an important step for us Click here to understand the process I hope that I am able to understand the project if you can understand this till here If you have completed it then please tell me in the comment Write and tell me that yes ours is on 50 The project is complete, now move forward We will grow and complete the project at 50 If you do it then those who have been able to reach here at least just let me know in the comments that yes mam ours is at 50 so that I know How many people walked halfway The project is also made minimally, let’s go right Let’s move ahead and proceed to the next step okay let’s do it our work is done now I will call the DED head once again and here now what was in the beginning I had said that whatever genre our column is there is a genre in it then a comma then in the middle There is white space right so what do we do now We will remove this white space and I want that across all the genres They are not written together, they are written separately Like action in one line then in the next line Adventure then science fiction next in line So, whatever these genres are, I want to break them I want like three generas one line here I have written what I want it to be Different, first comes the action, then comes the adventure Then science fiction came here in the same manner But first comes crime, then mystery If a thriller comes then whatever thing is written in one line We have multiples written here General, we want those different lines I write it and white space from here If it gets removed right then what should I do for it now For this we will have to do what Applications which are yet to be implemented We have to do this now, we are going to learn it So firstly I will put this in heading format I will write it down in mark down that V Wood split the genres into a list now here But we will treat this generosity like a list wanting and then after that we will do our will explore this data frame so that If a movie has three genres then it They came in different writings, like Spiderman First genre is action then spiderman is next in line Adventure in me then Spiderman next in line Science fiction i.e. Spiderman Spiderman Spiderman That Will Be Common Action will be written in front of it, then adventure And then science fiction so this work we People have to do this now, how to do it We will proceed further, let’s take this Basically we start watching now so The first thing that we notice here We have to do that for our data frame what do we have inside called genre The name of the column is So I’m Writing Here genre ok now in this genre column df And here we will write the genre again because The operation has to be performed in this genre Now we will dot ATR dot split here First of all we will know how to do splits People had seen it after every genre comma then white space so we can use comma and what is this regarding white space If we split then I am writing I pressed comma once again so that a A space is created and then an inverted comma I am closing it and then it’s done right so this I basically did it here now df2 df-41 Earlier this index was zero Index and in this index three things were written but now if you separate them then they will be in rows Action One will come, Adventure Two will come science fiction will come in so right now what we have We have data and it will become more data Right now the data we have is about 9000 a like let’s just see we up here was fired on 9827 data was right, so now as we We will break this genre into different things If it comes in line then the data will increase further It will come to us so I will write it here I am doing reset index reset index Setting Drop Equals to True after writing we have to because we want to do it permanently and call df dot head Alright, let’s run it and see And finally we are getting the result which we Wanted to see Spiderman here now? Nove Home This was the first movie with three things in it was an action adventure science fiction first one was coming with writing as we saw above It was both action, adventure and science fiction Now this is what it is, it’s split And different things are coming right now one more task What we have to do is that we have a column with the generator What do we have to do with this column? If you want to cast in category then here I am I will write it once in the comments Casting What column into Category right now for this to do this work df We have a column which is the genre column, this We are trying to make it right in the category genre equals two df3 right allright next here df now this The honour is this, we will write it here let’s take it and what is its data type now If you check this out, you are here now You will see that the one who was here earlier is now as many as We also have genres, they are already here They are together in a category and look here Our category data type is object Typewrite so we have already done this work now if you go and see first then only There were 9827 records, now we have split it I did it, now it has increased, so look now How much data do we have now? 9827 Earlier we had number of roses, now we have it passed 2552 right why because what we did The column containing the generator is written first in one line broke it apart now when you If you break it then definitely the data will increase from 9827 it is now done 2551 data you have ok now pay here The more unique data we have, the more If we see this in other columns also If you want I will write it here df1 yike right n unique let me call this so here we are getting the results that our As many likes as you have particular columns Release date is 100% unique data popular vote count general right so we have the total How many unique generas are there? There are 19 left The release date of the movie is repeated 100 is the right title which is 9415 in this way We have seen these things here What a unique value it is, now finally we move ahead Work on data visualization will increase We will answer the questions that have been asked to us in this One by one during the project you will If you solve the question, the more data you get We had to do pre-processing, we did it Now our data is absolutely accurate It has happened once, I even called and showed it to you I will give you the D.Ed. head now in the correct way Our data is organized, now we can use it All set to take out the insides We have prepared our data very well. Now there is no missing value in it there is no error or anything in this There is no problem here now, it is completely ready The data is done, now what to do There are five questions given to solve in this interview assignment Only four or five come in strict assignment I solved the question and sent it but its They don’t show that by making a visualization is the biggest mistake you ever make if someone If he is asking you to extract insight then he Please show me the visualization so that I can understand to the person in front that yes brother you If you know how to do visualization then first of all Setting up i for visualization I want style so I am aa d style I am writing SNS, what does SNS mean? means your c bon library so here we are The white grid has a very stylish look let’s set it up so that our The visualization should be made properly, now the first thing what was the question asked what is the most Frequency genre is this I will put it in heading format Now let me write it down by selecting mark down Which is that genre? So here now we have I have separated the genres and now I am asking on which frequency whose movies has been released netflix’s 2552 means total count of data is 19 unique generals which are the most in the genre in which movie has come that is the drama right and its what is the frequency 3715 now we know this I got the basic idea from here but now I wish that if I write this much If I give it to someone then no one will understand I want this first honor if it is the most There is the highest drama, then what comes after that I want to show this by making a graph So how will the graph be made using Seaborn library? we will use it here now i am here I will write SNS dot cat plot we are here We will make a CAT plot i.e. category estimation can show what we have and what we have What kind of graph do I want to create? Access will be created I will show you how to make it rough first so that you can understand that I want All the people should come here as if they were here Drama action is right for all these genres be written here and according to that Such a graph keeps getting smaller and bigger So you will know that this is the first genre and This is the minimum so you want a graph like this So what I want in the y axis is I’m writing in Axis genre comma data data in giving us people will have to do da comma kind equals to what kind of you want to keep count you want to keep count Means if you want to show the number then suppose Drama is our most category which is drama is the best genre His count will show that 3715 were deducted from his account. The count is right, we have written it here. Comma order comma order equals ToD A in which order should the genre be shown The value counts right whichever is largest comes first and then the smaller one comes Value Counts and Then After What We Setting up the index is a must will have a dot Index value counts then bracket close Then dot index right this is now color too If you want to give something of this then you Can’t mention the color as well so color equals to We can put the color code here so one if I want blue colour let’s suppose then its colour code is 428 7f f I will put the code here and show it to you I am getting the color right, this is our job Now we have to show it something about the graph There should be a title as well so the plot has turned into a twist We would name the title graph as title Are Genre column distribution ok now let’s show this If this graph comes out then for this I will have to write p lt dot show so I am writing here p lt dot show let’s just run this ok it is showing certain error error here because one side is double inverted comma and one side single inverted comma let’s fix this again it is showing certain error ok let’s just check what is the error it is y equal to genre here is speaking order equals two well look here here There is a mistake in writing the genre here but Close here with a single inverted comma I have not done this let’s do that and this is the graph v R getting so now we understand that as much as Now we are seeing people here differently of which we see the most in which Movies are based here, that is drama and the lowest one is western and we have the documentary right Just by looking at a graph you will know immediately Think from this point of view that Assume someone is working inside the company is he in your senior position or someone else He is from the department and he wants to see this From the creative department let’s suppose that Which genre of movie do you want to watch? The one who has been praised the most is us Here you can see that the drama is the most It has gone and the least that is there is Western Right, so we got to know about this general here. Through this our first question is solved happens to be asking in the first question Which genre has the most movies released? has happened netflix’s proceed for the next question so here the second question is which has highest votes in the vote average column right so here now we has to solve this second number question we have to properly apply hash to it and then back it down if we convert it into and write it then see now Here I will tell you once again that D.Ed. Head I am showing you this by writing and here we are seeing That’s our vote average column Of which what we have done is categorized is it has been labeled as popular not In the popular average it is saying that who The genres which are most popular are The highest average is below average now we have to show this so for this also We will make a graph and here our There will be labels, we have four labels on average popular below average and not popular then this We have to make a graph and show it here right so what we’re going to do is most Firstly, if you want to make a graph then use A D Cut Plot That will create a category plot on the y axis We will have a column with vote average in it So here we have to vote and average right vote and average than comma put it equal to df2 as written above in same manner right here But we will show its count also Next will be our order here So whatever I have written above is the same We have to show people things so I am here But what am I doing simply copying this I am pasting but please do not copy paste you have to write right if you are learning you want to learn as much as you can by writing code yourself say that will be great for you to pet d Look at the title, we are not here whatever If you want to give a title, they write the title Let’s write down the board distribution When you see a project If you make a bar, you will hear half the thing, half the thing I will be careful in making it but when you go to the second If you make a bar, you will be able to write the code yourself Right now I am showing by writing that this If you want to do this then watch the video first Make a project next time but do it yourself try once that I post other than video If I try to make it without seeing it, it will be much easier for you right so it is showing certain things like we are not getting the average vote count so let’s just Check OK, this is why a mistake is happening here Because I have put the genre here Right, you will have to change the vote average here It will come, we just did copy paste from above If you had not changed it then you have to enter it here If we look at the vote average now, this is what we get The vote average has been completed, we can see it here Are movies more popular than average ones below average and then not popular to second gonna show us what’s here We have the most movies here too I have already shown it on Let’s proceed with it What does question number three say? Movie got the most popular and what is it Its genre means which movie is liked the most Which movie has got more popularity and which is that movie Is the genre right? This is our question number three so I will give this also properly Select Mark Down in the Format heading I will do this and write it down, now we will write this down too If people want to solve this problem here then now The data frame we have is df. Inside DA and our columns are popular names There is a separate column from this I do one work, D.Ed Let me head over and show you just two first. If you look at the data, look here at the popular If you have one then which movie is the best? Popular is asking too much here and which generation does she belong to right so we Now we will write the code for this here, what is the code We will write it here first of all df our data frame We have inside a column named John Popular We have a column so I’m writing here Popular then after bracket closed double equals two In this we are assigning Popular because we create one by assigning it are here pay and then comma minimum Maximum is asking here first I will write maximum here and After this the bracket should have to be closed and then run a it is showing error popular i think The spelling of popular is wrong here, popular ok here p should be capital If the error is coming due to a spelling mistake then The most popular result is here The name of the movie in this data set is Spiderman and his popularity is 508.509 which is the movie which has lowest If it is popular, then we will post it here people will write hash then space properly run this code in mark down then same hum People need to do the same thing as we did above first up what we did was max Now I want to change this same thing I will pay here for minimum and here We are getting the result of such a movie There are two movies which are very popular The name of the first movie is The United States Vs Bali Holiday and other movies Threads are popular for both of them 133.5 what is its genre so the first movie the general of what is now the united states Music Drama History and the Threads Wali Mu threads movie is its generator If there is drama and science fiction then we When asked which movie is the lowest popular one The lowest popular movie is that it is the United States and Thread are two movies now The next question is asking which year is this which had the maximum number of movies It’s been a while now that we’ve been here If you want to show then we will solve it now finally its another question so i am just writing here question number a let se five here and we have to write this in a Format of a heading so select mark down run now here we are I have to find out which movie is that The film which has the most movies in the year If it is right then what should we do for it It would be better if you show it by making a graph We will all stay here in one access below What will people write? They will write the year like 1990 Its graph will appear here in 2000 such years It will be made like this and its value counts here If we stay right then this graph of ours will be like this We will create it here to make this graph. I will first write it in df df We have what we need, year to year In which year is the release date inside So we will write the release of this column here. name release underscore date okay and now we I will create a histogram here so I am Writing Her Hist And you will have to give some title to it too pat dot title what is the name of this graph If it happens, we will write it here The name of the graph will be the release date column Distribution okay alright a here somethings are in the caps and it’s not looking good so let’s just Write This Again column distribution alright done ok now show this we have to do it too so we are going to right here PAT dot show so that the graph is made and the runs are shown this code is ok it is showing error see error why is there a very small error here There is an error here, you put a double here inverted commas and here it is single so It is showing error because there is a mismatch so let’s make it very simple Now let’s put a single inverted comma here We have already got the release date column Now here we are looking at the best year The one in which the least number of movies have been released is of 1940 and 2020 is a year in which Most movies have been released in this Write down the answer so that when you complete this project Submit the file so that the recruiter can see that Well, he solved it using this method And the answers that came in the end were put in one place It is written with surprise that it shows your efficiency that the way you work, that is very neat and clean you in a neat and clean manner You work and explain each and every thing properly You write in a way that shows your systemic approach that shows your personality that you are having That skill set that will help you do every job systemwide that you have messed everything up by throwing garbage here and there If you give us the right, we will always do this work should anyone remember this any time Assignment comes, project comes, company comes If you want to submit then you can try it now right now you are just doing aspirant be kind but you can also go inside the company Whenever you write code, do it in the correct way It is very important to write by arranging it There is too much scolding from the other wise manager You need to get this thing right now If you want to get into a habit of this thing then let’s do it Surprisingly we finally got to the point Conclusion to surprise the points let me just write this in a mark down format and here are the things right so this is basically the first question We were asked which drama genre was the best the second highest was asked what will be the general on that so that will be drama and The most popular vote we saw was this The third question was that the most Which is the most adventurous and most popular movie? so if it is spiderman what was his genre we I wrote it and then after that I asked lowest The United was popular for two movies status and thread then asked him after that Which year had the most movies? If the film has happened in 22020 then we have all these Answer of question in a simplified manner here If it is written right then these things are very important happens whenever we work on a project we must have to write this things in a proper manner so guys I am The hospital is well understood This project will have to be done two to three times properly If you make it then the most special thing about this project what did you see that once we got the data has been pre-processed correctly After that we quickly asked five questions We had given them, we solved them quickly, but Where did the real hard work go in this project Pre-processing the data in creating it What to keep and what to remove in each column how to convert that column into labels I have to arrange this, this was the thing Worth learning in the project and always in the company If you go inside also then the data will be pre The most time consuming is processing and That is where the company is getting the most profits now. Why does it give this type of project? Because the company also wants to see that Do you know data pre-processing or not? Because if the data is clean then it Anyone will extract some insight and give you the right Even in platforms like GPT If you try putting it in, you will see something somewhere you will get insight but the most important thing is that Understanding each step is a hard task Because four GPTs cannot do this work. like what we did here is white space Right the numbers we gave It was changed to a label popular not popular so you have to think about it right so This thing is called data pre-processing any company judges this, whether you If you go to any company then such things will be yours This is checked during interviews This was our project in which this thing was very It was important and worth learning, now what is here Our work is over after making the project The work is not over yet, now what do you want You should go and do this project You can tag The Eye Scale The Eye Scale You can tag the page of Also if you want to connect with me Together and with the marks, both of us brother and sister So you can connect with us You will get detailed curriculum complete lecture and to & Projects Live Doubt Classes Industry Recognized Certificate of Interview preparation along with training You will also get help for this, the link is in the Description Hello everyone I am Swati And welcome to the class, in today’s class we Starting e-commerce sales Full project key for data analysis analyst and data science now this is This is an e-commerce project, so it is special Because the first reason for this is that e-commerce We all know about the companies first It was very difficult to imagine that in 10 minutes Inside our home we order something and come But now it is possible with e-commerce and This is possible because so much the data that is collected in the correct way Analyzing, building recommendation models, and the goods coming to our house, all these things The data science behind data analytics is a You have a huge hand in today’s project We will also complete it because E-commerce companies have a very efficient amount How to manage the data used It goes we will get to learn one thing and another The most important thing is that here we The project that we are doing is sales Whether you are a data analyst or not, you can do the analysis as well. Pay as a Data Scientist Business Analyst for any profile will go for giving interviews and whether they Any company, be it a health care company Do you work in a finance company or Any company working on AI Be it e-commerce or retail company, any company Sales is important in every company If there is a part then how to do sales analysis This is done in today’s project, you will You will also get to learn Python’s how to use libraries To do visualization, perform EDAC Today we will understand all these things we will do it through today’s project and this This project which is related to e-commerce is ours It would be very beneficial for the resume as well so definitely when you start this project You will be completing your confidence The level will increase and it will be good for your career too This could be a very important project Before making the project its complete The complete material is there, the source file is there, the code is there We have notes, all these things come to us for study There must be material for which all this Things I’ve already put down on git hapu It is placed below in the description box for you You will also get the link to git hub by going there Whatever number of files you have, the data is set You can easily download all these things So let’s start today’s class and let’s start this project all Right, let’s start today’s class where we will complete it completely The project that is your e-commerce data Now when we talk about e-commerce, the analysis If we do that then e-commerce will bring a revolution It came like this where we don’t know how many websites Know whether you use it for shopping or not flipkart-in jettar and many more like this E-commerce platforms have been built now When we talk about e-commerce, But somewhere or the other, every day millions of customers Now all these customers do shopping This data is stored in a proper manner Utilizing these to make company business decisions The company was able to improve its strategy so that the event venue can grow For this, we get so much data every day This data is released and produced It is very important to deal with And if I talk about the purpose of the job If we want to make ourselves job ready Do you want to appear in interviews That data analyst’s job is business If it is an analyst or a data scientist We have to find an e-commerce related The project must be done because there are many There are all such e-commerce companies where Hiring happens and the e-commerce tech segment there is a very large portion of Multiple requirements of multiple companies So if there are any such projects for you Portfolios include those in your resume If yes then this is also an add on advantage for you Maybe today we will be able to create such an e-commerce platform. We will take the data of here, much more than that data will try to extract all the insights So that you can understand the technical aspect as well. and along with it the business of the company This is your point of view, you should also understand this Now if I may talk about it here There are as many technical brands as Brands are like those people who like us We get rights online from where we people Do online shopping like let’s suppose Let’s say we went shopping flipkart-com is a platform but its Apart from this, there are many such offline stores Now these are the offline stores A lot of data is produced from them too. Like for example let me talk about Big Bazaar or should I earn or should I talk Lifestyle Key So all these are the brands of There is a digital presence, but its Along with this, they also have offline centers where we go and from their shop We do our own shopping, so now it’s so There are big franchise chains like If there is a D-Mark then their shops are there Customers also visit here and their There is data, we have to analyze it too It is important so today we are sharing such data We will take a set in which even if we go offline customers are coming online line customers are coming If so, then the analysis is done from their data All these things have to be taken out in today’s In today’s project in class, we Now people will discuss whatever the size You can look at the brands even if I talk about them Lens Cart’s Sugar Cosmetics Mama Earth Louis Vito Sunny or else I am shopping from my cart so I Visit Lenskart’s online website and app I can go shopping there or I Go shopping at any Lenskart store If I can do it then online data and offline The data which is of both these customers How to deal with today’s project We will keep all these things in mind as well And now we will learn all these things too The situation you have here is that you The data of an e-commerce company is here pay is given so first of all I will tell you Let me show you the data set here, something like this type of data set we have here Available now in this data set you have to order ID of which date the shipping was done what was the mode customer id was from which country The customer was City State, all of this The data is given to you here Product ID: How much quantity did that customer buy? How much did you buy and sell? How much was the discount? How much was the profit, all these things It is now given that every company has the most The more important thing would be That company has the sales right, no matter which company it is Also if I talk about the company then give me sales way it could be one of her online Sales can be done through online mode and an offline mode Sales from this event can be important What is it like to analyze his sales? How much profit did that company make? There was no loss so much expenses If the company does it, then every company, whether you are any also go to the company for every company its It is very important to analyze the sales If it is more important then today we Whenever there is a company, someone who sells How much profit is to be made from it How much revenue is all this coming monthly You will also learn these things in today’s project So here we actually have the data set Have a look at e-commerce here The data set is available now also here But we have some questions Whatever amount of data is there in this data set Looking at the record, here we You have to solve six to seven questions The first question here is being asked by you Need to calculate the monthly sales of the store End Identification has the highest sales and the Lowest sales means you have a company You have a record of every sale The sales of the month have to be analyzed and this Tell me which month is the most What is the sales and which month is the lowest? Sales have happened, after that you have to analyze it You need to analyze sales based on Product Category and Determine Which The category has the lowest sales and which judges the highest sale now every single company when we Let’s talk about different categories of e-commerce I sell things, for example, furniture Electronic became a category Appliances has become one category and different If there can be a category here then which one? In which category sales are more and in which less We have analyzed all these things Have to do it according to the company’s product Now let’s talk about sales analysis needs to Be done on the sub category now like for For example, let me talk about a category If I buy electronic appliances If I talk about category then mobile is your Laptop has become a separate category in this TV has become a different category, yours is different AC has become a category, AC has become a separate category We also get sales according to each sub category I have to do the analysis of this here fourth The question is telling you that you need to analyze the Monthly profit from the sales determined Which month has the highest profit which month The company made the highest profit in a month This has happened, we also have to remove it Together we all get profit In the category let’s suppose company if If you sell electronic goods then it is possible that he is facing loss in mobile and If you are getting benefit from laptop then it is more If you focus on your laptop then which one? In this category, he has an advantage and a disadvantage You also have to take it out and show it along with this You have to understand each customer segment which is different Some customers shop like this Those who do shopping, their monthly income is 5 There are some customers who are less than Rs 5,00,000 which will have more than 1 lakh different If the customer segment is right then According to them we also have sales here Data has to be analysed and finally speak This is also the sales to profit ratio You have to take it out now let’s suppose your sales Right of ₹ 1 lakh is done but in this The profit margin was very low so how much Was there profit or was the company in loss? was as mathematical as possible about all these things Operations are the profit from sales We will tell you all the things through today’s project. People will solve these seven questions which were given to us as an assignment We will answer these seven questions one by one People will find the answers here when you Even if you go into interviews, actually What happens is that in your first round you have it in the same way as I am now Telling you like a business case study I have given you a data set Questions are given and you have 24 to 48 hours to answer them time is given that all these By finding the answer to the questions you can solve your problem. This is the code file, I will mail everything If the company has your If you get shortlisted then you will get second chance When a call comes for the round then this Like assignments which are questions and special We should do it as far as e-commerce is concerned If he wants then he has to answer all these seven questions We will solve different concepts will clean the data Manipulation will be done by EDL visualization If we do then we will learn all these things You will meet me in today’s project So let us now move forward with the company’s case We have understood what we have to study Now we will start further work, how will we collect the data We will extract all this information one by one One, let’s start this today project to do all these things We need to analyze the data first. So for this we will have to use Jupiter Notebook for which we use Anaconda Navigator We must have Anaconda installed Navigator is already installed on my system so We’ll go to the start here, Anaconda Navigator will search Anacanda here As soon as the navigator appears, you can simply use it you can go and open it when you open it to see the interface something like this Here we will get an ID whose The name is Jupyter Notebook this Jupiter You can find the button to launch the notebook here. You will get it as soon as we launch it here If you do this, whichever browser you use You will automatically get this in your browser This will open for me here, it is already there It is open now after this this data set of ours I have been given this data set which is the most I will have to upload it first, I have made one here A new folder is created and its What will I do inside I will upload it here so let’s put this data set here Simply click on upload and you will store the sample name is the name of this data set so here We have uploaded it now the next step what will happen now the next step will be that as much as There is also data in it, we need Python Libraries will have to be installed and after that the data If you need to analyze it then click here for it But I will go to new and the first option which I have given your python3 iva kernel to this If I simply open it here then this will be our The pass will open here Python IY File Here we perform all the operations I will now name this file something no it is so it is untitled you are untitled You will go there and click on it and whatever name you we want to keep it’s name here Want to keep the e-commerce project right So here I am going to start with an e-commerce project called I renamed this file now The first thing we do is to take this data set that we have There are several things that have happened in this data set. People have to do analysis and visualization We have to do monthly sales here He said right, he told us here how much profit We would have plenty of these things We need to make graphs here so that we can Now you can create the correct report You will need some libraries for this First we have to see that the data is clean data Is there any error in the data this is something we need to figure out first So for this we need people here You will need some libraries here We are doing libraries one by one When I start importing the data When I talk about cleaning then the most Important libraries are located here Panda, this is the panda library which helps We can do data cleaning very well with this Now we can see many graphs Here you have to make it for visualization Many times you have used matte flat lip color You might have used Plotly but this In the project I would especially like to tell you about the new LATEST LIBRARY Matte Palette Lip Seaborn The libraries are quite old, from 2003 Its use has been going on for around but This Plotly library is from 2015 Since then work on it has started, so it The library is on Pallip Seaborn It is based but this library is a bit advanced it is like a new library and in it Many latest things have come which will help This makes the graph dynamic and it gets created quickly If yes then we will use this library A lot of people skip Plotly but if you have started this project If you complete it, it means your Plotly library is also somewhere in this Your concepts will also be covered in this During the project, we are here We will use the Plotly library because This is dynamic, it is a new library and You can try new things in the industry You will have to do new things that will come out of it You should know how to use it, we are just one source But if you can’t rely on it then go for a matte lip I have done other projects on Seeb too But I am doing this project on Plotly I am doing this so that you can learn Plotly as well Let’s go ahead and first of all here We import Plotly Write to the library for this here I will have to import plotly.com Express SP 1 now what does this mean This is about data visualization For this, the library which is here can be used Now we will have to use it here I also have to make a lot of graphs by doing this so I its another module import plotly dot graph underscore objects here I will write it down and we will name it as age here. People will write that what will this do to us To create advanced and customized graphs will help for now after this there is another one here We will use Plotly here module import plotly dcompare this what work should I do So these are the templates of the graph This would have been very helpful for him here After this there is another module of Plotly That is why I am telling you this in all the modules so that you can use Plotly from here Understanding can also be developed through import Plotly now I want colors here too If it is in my graph then I will write it here I am importing plotly dot colors edge Colours right, these are the colours I used now what I want here is that By default our template’s theme is I want it to be white so here it is But I will use PIO which I have mentioned above Plotly is already written here PO D template and here we have no default We will use template so I am using default here I am writing PO D Template D Default pad telete d default equals to now here I want yes this invalid syntax is coming so Because our code just ran by mistake Plotly underscore not completed white white here is the template If I want a theme, I wrote it here. White now let’s run this all of it Your libraries will be imported here it is showing some error here let’s just Check Plus Let’s Check Where the Mistake Is So here the P is capitalized. It needs to be made smaller, alright, so right now it is This is our mistake, by mistake we capitalize on it It was done, we made it smaller, now this The code has been run properly, error g Why is Panda being used Data is being used using Panda Plotly for cleaning up your visualizations Plotly does not judge graph objects for Go This will help you advance and customize For the graph this is Plotly D Ao P Ao This will help you to get a graph template For customizing colors we have I have already imported it here and The theme we want is white so I have written plotly white here so this what have we done here all the time Now we have imported this data It was uploaded here, now read this data also we have to do that then by data name i am going to do this one I will create a variable and I will put this data here But if I read it then it is equal to read Under We have our data in CSV and beyond Its name is sample now you just look at it like this

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog

  • People-Pleasing Phrases You Should Remove from Your Vocabulary

    People-Pleasing Phrases You Should Remove from Your Vocabulary

    Have you ever caught yourself constantly agreeing, apologizing, or downplaying your own needs just to keep the peace? People-pleasing is often mistaken for kindness, but in reality, it can be a self-destructive habit that erodes confidence and personal boundaries. The words we choose to express ourselves have power—they shape our relationships, influence how others perceive us, and, most importantly, define how we value ourselves. Unfortunately, many common phrases reinforce the idea that our own needs and desires come second to those of others.

    The problem with people-pleasing language is that it subtly conditions us to prioritize external validation over our own well-being. It teaches us to minimize our feelings, tolerate discomfort, and take on responsibilities that aren’t ours to bear. This linguistic pattern, often ingrained from childhood, can lead to burnout, resentment, and even an identity crisis. As author and researcher Brené Brown states, “Daring to set boundaries is about having the courage to love ourselves, even when we risk disappointing others.” The first step toward breaking free from people-pleasing tendencies is recognizing the phrases that keep us trapped in this cycle.

    In this article, we’ll examine 17 common people-pleasing phrases that you should remove from your vocabulary. By eliminating these expressions, you can start asserting yourself with confidence, setting healthier boundaries, and fostering relationships built on mutual respect rather than self-sacrifice. Words matter—it’s time to choose ones that empower rather than diminish you.


    1- “I’m fine.”

    How many times have you said, “I’m fine,” when you were anything but? This phrase is often a defense mechanism used to avoid confrontation, suppress emotions, or appear low-maintenance. The problem is that constantly downplaying your feelings can lead to emotional suppression, which, according to psychologist Dr. Guy Winch, can have long-term mental health consequences, including anxiety and depression. By refusing to acknowledge and express your true emotions, you deny yourself the opportunity for genuine support and connection with others.

    A more honest and self-respecting approach is to express how you truly feel—without fearing judgment. Instead of saying, “I’m fine,” try, “I’m feeling overwhelmed, but I appreciate you asking.” This small shift in language invites meaningful conversations and allows those around you to offer real support. As author Susan Cain notes in Quiet: The Power of Introverts in a World That Can’t Stop Talking, authenticity in communication strengthens relationships and fosters deeper connections.


    2- “It’s no trouble at all.”

    While offering help can be a generous act, dismissing the effort involved can make others take your time and energy for granted. Saying “It’s no trouble at all” minimizes the work you’re putting in, making it easier for people to continue expecting favors without recognizing their impact on you. Over time, this pattern can lead to resentment and burnout, especially if you feel unappreciated or overextended.

    Instead of brushing off your effort, acknowledge it. A simple rephrase like, “I’m happy to help, but I do have other commitments as well” sets a boundary while still offering assistance. Dr. Henry Cloud, in his book Boundaries: When to Say Yes, How to Say No to Take Control of Your Life, emphasizes that setting limits doesn’t make you selfish—it makes you responsible for your own well-being.


    3- “I don’t mind.”

    This phrase, often used to avoid conflict or seem agreeable, can signal to others that your preferences are unimportant. When you say, “I don’t mind,” you unconsciously train people to disregard your input, reinforcing the idea that your needs are secondary. Over time, this can erode self-confidence and make decision-making difficult because you’ve conditioned yourself to defer to others.

    Instead, express your real opinion. If you truly have no preference, you can say, “I’m open to either option, but I’d like to hear what you think.” This statement still communicates flexibility without erasing your voice. As communication expert Celeste Headlee suggests in We Need to Talk: How to Have Conversations That Matter, effective dialogue requires both parties to contribute their thoughts, rather than defaulting to passivity.

    4- “I’m sorry” (when you’re not)

    Apologizing excessively—even when you haven’t done anything wrong—undermines your confidence and reinforces the idea that you’re at fault for things beyond your control. Dr. Harriet Lerner, author of Why Won’t You Apologize?, explains that over-apologizing can signal low self-esteem and make others view you as less authoritative. When you say, “I’m sorry” unnecessarily, you place yourself in a submissive position, diminishing your credibility in both personal and professional settings.

    Rather than defaulting to an apology, practice using alternatives like, “Thank you for your patience” instead of “Sorry for the wait.” If an apology is truly warranted, make it meaningful—acknowledge responsibility, express genuine remorse, and move forward with a solution. Shifting from unnecessary apologies to more constructive responses will help you maintain self-respect and command greater respect from others.


    5- “Yes” (when you mean no)

    Saying “yes” when you really want to say “no” is a classic people-pleasing habit that can lead to exhaustion and resentment. Author and entrepreneur Greg McKeown, in his book Essentialism: The Disciplined Pursuit of Less, emphasizes that every “yes” is a trade-off—agreeing to something you don’t want means sacrificing time and energy for what truly matters. Overcommitting yourself often leads to burnout, leaving you feeling overwhelmed and stretched too thin.

    Learning to say “no” doesn’t mean you’re being difficult—it means you value your time and priorities. Instead of a hesitant “yes,” try responding with, “I appreciate the offer, but I can’t commit to that right now.” This approach is firm yet polite, making it clear that your boundaries matter. Remember, saying “no” to something unimportant means saying “yes” to yourself.


    6- “I’ll just do it myself.”

    Taking responsibility is admirable, but constantly shouldering tasks to avoid burdening others can lead to frustration and burnout. The belief that “it’s easier if I just do it myself” often stems from perfectionism or a fear of disappointing others. However, as leadership expert Simon Sinek notes, “Delegation isn’t about losing control; it’s about empowering others.” If you always take on everything yourself, you not only exhaust yourself but also deny others the opportunity to learn and contribute.

    Instead of doing everything alone, practice asking for help. Say, “I’d love your input on this,” or “Could you take care of this part?” Allowing others to share the workload fosters collaboration and prevents you from becoming overwhelmed. Recognizing that you don’t have to do it all is a crucial step toward balance and well-being.


    7- “It’s not a big deal.”

    Downplaying your own concerns, achievements, or struggles can lead others to do the same. When you say, “It’s not a big deal,” you minimize your worth and discourage people from recognizing your contributions. This habit can stem from discomfort with praise or a fear of appearing self-important, but it ultimately weakens your confidence and impact.

    Instead, own your experiences. If someone compliments you, resist the urge to brush it off. Instead of “It’s nothing,” try, “Thank you, I worked hard on it.” This subtle shift allows you to accept recognition gracefully while reinforcing your value. As Amy Cuddy discusses in Presence: Bringing Your Boldest Self to Your Biggest Challenges, embracing your accomplishments strengthens your confidence and helps you show up more authentically in life.


    8- “I should…”

    The phrase “I should” carries a sense of obligation rather than genuine desire, often making you feel guilty or pressured into doing things you don’t truly want to do. Psychologist Dr. Richard Carlson, in Don’t Sweat the Small Stuff, explains that excessive use of “should” leads to unnecessary stress and dissatisfaction. It implies external expectations rather than personal choice, keeping you trapped in a cycle of obligation.

    Instead, replace “I should” with “I want to” or “I choose to.” This shift helps you take ownership of your decisions rather than feeling bound by guilt or duty. For example, instead of saying, “I should exercise more,” say, “I want to make time for my health.” This approach empowers you to act out of intention rather than obligation.


    9- “Whatever you want.”

    While being easygoing can be a positive trait, constantly deferring decisions to others sends the message that your opinions don’t matter. Saying “Whatever you want” too often can make you seem indifferent or uninvested, weakening your ability to advocate for yourself. Dr. Marsha Linehan, a leading psychologist in emotional regulation, explains that assertive communication is key to building mutual respect in relationships.

    Instead of dismissing your own preferences, express your thoughts with confidence. Try saying, “I’d like to hear your thoughts, but I was thinking about…” This keeps the conversation open while ensuring that your voice is heard. Relationships thrive when both parties contribute equally, so practice asserting your needs.


    10- “I’ll try.”

    Saying “I’ll try” often conveys uncertainty and lack of commitment, making it easy to back out or not follow through. Leadership expert John C. Maxwell emphasizes in The 15 Invaluable Laws of Growth that success requires decisiveness and confidence, not hesitation. When you say, “I’ll try,” you leave room for doubt rather than fully committing to an action.

    Replace “I’ll try” with stronger language, such as “I will” or “I’m working on it.” This small change makes a significant difference in how others perceive your reliability and how you approach challenges. Confidence begins with the words you choose, so commit with certainty.


    11- “Don’t worry about me.”

    This phrase, while seemingly selfless, often prevents people from offering support when you actually need it. By insisting that others shouldn’t worry, you may unintentionally isolate yourself or suppress your emotions. Dr. Brené Brown, in The Gifts of Imperfection, argues that vulnerability and connection go hand in hand—allowing others to care for you fosters stronger relationships.

    Instead, acknowledge when you need support. Say, “I appreciate your concern, and I could use some help.” This openness strengthens connections and shows that accepting help is not a weakness but a sign of trust.


    12- “I guess…”

    Using “I guess” weakens your statements and makes you seem unsure of yourself. This phrase often creeps into speech as a way to avoid sounding too assertive, but it ultimately diminishes your credibility. As negotiation expert Chris Voss states in Never Split the Difference, confident communication is key to influencing others and standing your ground.

    Instead, replace “I guess” with clear, direct statements. Instead of “I guess I can do that,” say, “Yes, I can do that” or “No, I can’t commit to that.” Owning your decisions demonstrates confidence and self-respect.


    13- “I’m just…”

    The word “just” minimizes whatever follows it, making your statements appear weaker. Saying, “I’m just checking in” or “I just wanted to ask” reduces the importance of your message, making it sound apologetic. Communication expert Debra Fine, in The Fine Art of Small Talk, explains that removing unnecessary qualifiers makes your speech more impactful.

    Instead, drop the “just” and state your point directly. Say, “I wanted to follow up,” or “I need clarification.” Speaking with clarity and confidence increases your credibility.


    14- “I’ll do whatever you think is best.”

    While deferring to someone else’s expertise is fine in some situations, constantly saying this phrase makes it seem like you lack your own perspective. It signals a lack of confidence in your own judgment.

    Instead, express your thoughts first. Say, “I trust your input, but here’s what I think…” This creates a balanced conversation rather than making you seem passive.


    15- “It’s probably my fault.”

    Blaming yourself unnecessarily can erode self-esteem. Instead of assuming fault, focus on facts.

    Replace it with, “Let’s figure out what happened.” This keeps the discussion objective rather than self-deprecating.


    16- “I’ll get to it eventually.”

    Procrastination language weakens credibility. Instead, use clear timeframes: “I’ll complete this by…”


    17- “I’m flexible.”

    Being adaptable is great, but overusing “I’m flexible” can make it seem like you have no boundaries. Instead, say, “Here’s what works best for me.”


    Conclusion

    Language shapes reality. By eliminating these people-pleasing phrases, you can start asserting yourself, setting boundaries, and communicating with confidence. Choose words that reflect your worth—you deserve to be heard.

    By Amjad Izhar
    Contact: amjad.izhar@gmail.com
    https://amjadizhar.blog