Questions tagged [select]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
82 views

Problem taking a SUM with SQL to python

I am doing Finance and I am fighting with this code... could anyone help me? I want to "select" some data from a sql table and put this value to a variable in python (a specific FLOAT number)...
0
votes
0answers
47 views

PSET7 Survey Submit50 not recognizing select menu

I have finished the Survey problem and everything works perfectly, yet for some reason when I submit it my select menu is not recognized by Submit50 and it marks the "has one or more select menus, ...
0
votes
1answer
79 views

pset7 "index" - using SQL SUM adds a parenthesis to returned dict strings

I executed the following to return a dict (grouped by stock symbols) of stock symbols, total shares and total value owned. stocks = db.execute("SELECT buy.stock_code, SUM(buy.value), SUM(buy.shares) ...
0
votes
1answer
857 views

pset7 (buy): what does "SELECT cash FROM users WHERE id = 1" do?

In the pset7 Walkthrough (buy): db.execute("SELECT cash FROM users WHERE id = 1") Where does this "id = 1" come from ? This, makes better sense to me: db.execute("SELECT cash from users WHERE id = ...
1
vote
2answers
172 views

Pset7 => "NoneType" error on SELECT query (2017)

I’m really stuck on the index part of PSET7…. Flask keeps iterating over the following SELECT query: dab = db.execute("SELECT SUM(share) FROM portfolio WHERE symbol = :symbol AND user_id = :user_id",...
0
votes
1answer
184 views

pset7 I can't use usd() and have a problem with datetime method

1- pset7 I can't use usd() because I still need the values(int) to select the number for calculation 2- I used datetime.datetime.now()and it gives me just date without the time. anyone can help me :) ...
0
votes
1answer
179 views

SQL SELECT query

Sorry if this is a novice error but I had some problems with SELECT. I executed a query for retrieving all the stocks, which were purchased by a user, in a database called portfolio. 'Usernamer' is a ...