Reply
  • Apr 15, 2022
    ·
    1 reply
    Yuzzy

    That title makes me think yall are using it for stuff aside from querying the data which would explain your difficulties. In industry you'd do any of the other stuff SQL offers before loading the data onto a SQL server and only do your queries there (unless you had an administrative role). That said complicated queries can be tricky.

    I'd rec learning Python and making a lil project with it if ur goal is getting an internship. I can help you set up a web sraper (theres hella internet resources too) and then you can do some a***ysis on whatever u like. Maybe even implement some ML. The cool thing about Python is the libraries make it easy to do things which would be super hard in other languages albeit at the expense of memory management and speed

    Having trouble with a mySQL assignment. Think you could help?

    How do I call a function inside of procedure, and then return the results as a new variable?

    Check that the film is in stock. You can use the "film_in_stock" function to count the number of copies of a film that are in stock, into a variable (the third parameter). You can then test that variable using:
    IF (@​inStockValue = 0) THEN
    // Actions here
    END IF;

    The parameters for the "film_in_stock" function are p_film_id and p_store_id as input and p_film_count as output.

    I need to make it so whatever is returned for p_film_count gets put into the "inStockValue" variable.

  • Apr 15, 2022
    ·
    1 reply
    Electric

    Having trouble with a mySQL assignment. Think you could help?

    How do I call a function inside of procedure, and then return the results as a new variable?

    Check that the film is in stock. You can use the "film_in_stock" function to count the number of copies of a film that are in stock, into a variable (the third parameter). You can then test that variable using:
    IF (@​inStockValue = 0) THEN
    // Actions here
    END IF;

    The parameters for the "film_in_stock" function are p_film_id and p_store_id as input and p_film_count as output.

    I need to make it so whatever is returned for p_film_count gets put into the "inStockValue" variable.

    Google tells me the set keyword may be what you need, so a line like SET @returnedValue = name_of_function(parameter 1, ...)
    I'm not sure how the function works but a CTE may be useful too, happy to explain how to use those if you're not familiar

  • Apr 15, 2022
    Yuzzy

    Google tells me the set keyword may be what you need, so a line like SET @​returnedValue = name_of_function(parameter 1, ...)
    I'm not sure how the function works but a CTE may be useful too, happy to explain how to use those if you're not familiar

    I tried that but still getting a syntax error.

    Just gonna go ahead and ask my professor, it's probably something really random and unrelated to the query itself.

    SQL is woat

  • Apr 15, 2022
    ·
    edited
    ·
    1 reply

    This my code

    BEGIN TRANSACTION;
    SET inStockValue = film_in_stock(p_film_id, p_store_id, OUT p_film_count);

    IF (@​inStockValue = 0) THEN
    ROLLBACK;

    And this the error

    MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '; SET @inStockValue = film_in_stock(p_film_id, p_store_id, @inStockValue); ...' at line 1

    Lowkey think it has to do with the "BEGIN TRANSACTION" part, but he requires us to put it in a transaction.

  • Apr 15, 2022
    ·
    1 reply
    Electric

    This my code

    BEGIN TRANSACTION;
    SET inStockValue = film_in_stock(p_film_id, p_store_id, OUT p_film_count);

    IF (@​inStockValue = 0) THEN
    ROLLBACK;

    And this the error

    MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '; SET @​inStockValue = film_in_stock(p_film_id, p_store_id, @​inStockValue); ...' at line 1

    Lowkey think it has to do with the "BEGIN TRANSACTION" part, but he requires us to put it in a transaction.

    What's the OUT keyword on the 3rd parameter? Haven't seen that before

  • Apr 15, 2022
    ·
    1 reply
    Yuzzy

    What's the OUT keyword on the 3rd parameter? Haven't seen that before

    Just me trying random s*** tbh.

    I'm trying to get the output of film_in_stock into the new ​inStockValue variable. The film_in_stock function/procedure has one output parameter which tells you the count of films in stock at a particular store.

    Here's what I have now, I think this makes a little more sense. Still get an error though.

    START TRANSACTION;
    SET @inStockValue = film_in_stock(p_film_id, p_store_id, @inStockValue);
    IF (@​inStockValue = 0) THEN ROLLBACK;

    If there are no films in stock at the store then I'm supposed to cancel and undo any actions by the transaction.

  • Apr 15, 2022
    ·
    1 reply


  • Apr 15, 2022
    Electric

    Just me trying random s*** tbh.

    I'm trying to get the output of film_in_stock into the new ​inStockValue variable. The film_in_stock function/procedure has one output parameter which tells you the count of films in stock at a particular store.

    Here's what I have now, I think this makes a little more sense. Still get an error though.

    START TRANSACTION;
    SET @​inStockValue = film_in_stock(p_film_id, p_store_id, @​inStockValue);
    IF (@​inStockValue = 0) THEN ROLLBACK;

    If there are no films in stock at the store then I'm supposed to cancel and undo any actions by the transaction.

    U can't pass the variable as a parameter to the function since it doesn't have a value yet

  • Apr 15, 2022
    ·
    1 reply
    Electric


    I cannot read that fam

  • Apr 15, 2022
    ·
    1 reply
    Yuzzy

    I cannot read that fam

    Open it in a new tab if you can.

    Are you talking about the @inStockValue variable? ^

  • Apr 15, 2022
    Electric

    Open it in a new tab if you can.

    Are you talking about the @​inStockValue variable? ^

    I opened in imgur but still too pixelated.
    Yeah exactly

  • Apr 15, 2022
    ·
    edited
    ·
    1 reply

    Anyone have experience in sports betting algorithms
    I know Python java R etc, interested in doing some ML or some other type of a***ysis but was wondering if someone knows what libraries to use, what statistics to use

  • Apr 16, 2022
    ·
    2 replies

    gnna start learning linux and aws ig

  • Apr 16, 2022
    viscera

    gnna start learning linux and aws ig

    that's a smart play, lots of opportunity with those skills.

  • viscera

    gnna start learning linux and aws ig

    install gentoo

  • Apr 18, 2022

    Tfw it's a cold rainy Monday and ur code that's been working for weeks suddenly isn't working and ur just not in the mood to debug s***

    I swear I'm going into data a***ytics so I can just do t tests all day

  • Apr 18, 2022

    just realized why a script i wrote months ago wasnt working

  • Apr 26, 2022
    ·
    1 reply

    FAANG phone screening next weekend

  • Apr 27, 2022
    ·
    1 reply

    For anyone studying SDE (or coding in general) I'll drop a few websites I found a few days ago. Wish I found these sooner, but I'll definitely will try to use these leading up to my interview.

    Neetcode YouTube channel- A Youtube channel where a guy not only details his journey from unemployment to an offer at Google, but also has various videos on Leetcode problems and algorithms.
    Neetcode.io- Website created by the same person of the previous item that lists 150 Leetcode questions by pattern and difficulty increasing so that you have an easier time learning the pattern behind the question. He got this idea from the 'Grind 75' Questions (also listed on the website)

    Tech Interview Handbook- A website created by the person who created the 'Grind 75' site that gives you a study plan for Leetcode patterns once you give it your timeframe and how many hours you'll dedicate.

    BackToBackSWE Youtube channel-Havent clicked any of these videos yet, but from a quick skim it looks like a channel that explains various algorithms. Hasnt had a video uploading in 2 years though.

    Leetcode Patterns- Some Leetcode questions listed with patterns and which companies might have asked them in the past.

    Quastor- A daily tech newsletter sent to your email. Each newsletter contains a deep dive into a system used by a tech company, snippets of tech blog posts, and contains a few Leetcode problems with detailed solutions at the bottom.

    r/cscareerquestions- I know how some people feel about Reddit, but I would be lost without this specific subreddit. Gave me something to look at my current non-CS job. There's posts weekly for resume critique (albeit from people looking for jobs too), FAANG discussions and Interview discussions.

    Hope these help in some capacity.

  • Apr 27, 2022
    ·
    1 reply
    Jayto

    For anyone studying SDE (or coding in general) I'll drop a few websites I found a few days ago. Wish I found these sooner, but I'll definitely will try to use these leading up to my interview.

    Neetcode YouTube channel- A Youtube channel where a guy not only details his journey from unemployment to an offer at Google, but also has various videos on Leetcode problems and algorithms.
    Neetcode.io- Website created by the same person of the previous item that lists 150 Leetcode questions by pattern and difficulty increasing so that you have an easier time learning the pattern behind the question. He got this idea from the 'Grind 75' Questions (also listed on the website)

    Tech Interview Handbook- A website created by the person who created the 'Grind 75' site that gives you a study plan for Leetcode patterns once you give it your timeframe and how many hours you'll dedicate.

    BackToBackSWE Youtube channel-Havent clicked any of these videos yet, but from a quick skim it looks like a channel that explains various algorithms. Hasnt had a video uploading in 2 years though.

    Leetcode Patterns- Some Leetcode questions listed with patterns and which companies might have asked them in the past.

    Quastor- A daily tech newsletter sent to your email. Each newsletter contains a deep dive into a system used by a tech company, snippets of tech blog posts, and contains a few Leetcode problems with detailed solutions at the bottom.

    r/cscareerquestions- I know how some people feel about Reddit, but I would be lost without this specific subreddit. Gave me something to look at my current non-CS job. There's posts weekly for resume critique (albeit from people looking for jobs too), FAANG discussions and Interview discussions.

    Hope these help in some capacity.

    cscareerquestions is a lot of high school students and undergrads, nothing wrong with that, but just something to be aware of

    though less active and less focused on the interview process, i find experienceddevs to be a better read

    for interview prep educative's grokking the ___ series gets a lot of praise from people i know - it's all paid but the "grokking the coding interview" one can be found on the usual websites (though without builtin environment functionality, you just get the html pages, which is enough)

  • Apr 28, 2022
    ·
    1 reply
    arrrg

    cscareerquestions is a lot of high school students and undergrads, nothing wrong with that, but just something to be aware of

    though less active and less focused on the interview process, i find experienceddevs to be a better read

    for interview prep educative's grokking the ___ series gets a lot of praise from people i know - it's all paid but the "grokking the coding interview" one can be found on the usual websites (though without builtin environment functionality, you just get the html pages, which is enough)

    I myself am using Cracking the Coding Interview but have heard about Grokking. Not comfortable spending that bread lol

  • Apr 28, 2022
    Jayto

    I myself am using Cracking the Coding Interview but have heard about Grokking. Not comfortable spending that bread lol

    I'm saying you can get the material for free but agreed

  • Apr 28, 2022
    Jayto

    FAANG phone screening next weekend

    All the best man. You got this!

  • Apr 28, 2022

    Ayee new data looking perfect

    I smell a paper coming

1
...
39
40
41
...
56