I build all kinds of stuff and I need to calculate the quantity of each task to charge my clients. Some tasks are measured by volume units, such as m3 (cubic meter, three dimensions multipled), others are measured by m2, others by kilogram (dimension x unit weight), others are simple, just a piece, and there are others, I remember having used 7, 8 different values. This is done in Excel quite easily, but how would I do this in SQL? Here's an example dataset:
For the terrain fill, I want to charge the filling that goes from A to C x-axis, and from 1 to 25 y-axis, "a" is length, "b" is width, "c" is depth, "reps" is repetitions of those measurements, "formula_id" is my hallucination, I want to enter there something like a*b*c*reps as text and I'm hoping that to be calculated after being evaluated somehow. This is my schema:
As you can see, this is likely not the best approach, it's hacky. However, my users, especially me, we loved doing this in Excel, but I can't wrap my head around this concept when I think of the form design. You see, "a, b, c" are variable, sometimes "a" could be length, sometimes it could be width, others it could be depth, it depends on the type of task. For example:
If I have to quantify the volume of a wall, I'd use "length", "width" and "thickness"
If I want to quantify excavation, I'd use "length", "width" and "depth"
My headers should vary, it's getting pretty complicated at this point. I need some guidance. I'm attaching the sample.
For the terrain fill, I want to charge the filling that goes from A to C x-axis, and from 1 to 25 y-axis, "a" is length, "b" is width, "c" is depth, "reps" is repetitions of those measurements, "formula_id" is my hallucination, I want to enter there something like a*b*c*reps as text and I'm hoping that to be calculated after being evaluated somehow. This is my schema:
As you can see, this is likely not the best approach, it's hacky. However, my users, especially me, we loved doing this in Excel, but I can't wrap my head around this concept when I think of the form design. You see, "a, b, c" are variable, sometimes "a" could be length, sometimes it could be width, others it could be depth, it depends on the type of task. For example:
If I have to quantify the volume of a wall, I'd use "length", "width" and "thickness"
If I want to quantify excavation, I'd use "length", "width" and "depth"
My headers should vary, it's getting pretty complicated at this point. I need some guidance. I'm attaching the sample.