sql
stringlengths
6
1.05M
<reponame>daniel12905461/ProfeSoft INSERT INTO Profesor (PrimerNombre,SegundoNombre,ApellidoPaterno,ApellidoMaterno,Usuario,Contrasenia) VALUES ('Maricela','','Delgado','Camacho','a','a'); INSERT INTO Curso (Curso,Grado,Paralelo,IdProfesor) VALUES ('Tercero','Primario','B',1), ('Tercero','Primario','A',1); INSERT INT...
<gh_stars>0 CREATE TABLE "Departamento" ( "nome" varchar(100) NOT NULL, "id" serial unique, "id_gerente" int, CONSTRAINT "DepartamentoPK" PRIMARY KEY ("id") ) INSERT INTO "Departamento" (nome) values ('RH') CREATE TABLE "Funcionario" ( "nome" varchar (100) NOT NULL, "id" serial unique, "idD...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 19, 2016 at 10:12 AM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
<filename>titles.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Май 08 2020 г., 21:07 -- Версия сервера: 10.4.11-MariaDB -- Версия PHP: 7.4.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 S...
<reponame>bertyhell/transl<gh_stars>0 alter table "public"."branch_languages" rename column "branch_id" to "project_id";
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.9.5deb2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Waktu pembuatan: 27 Apr 2021 pada 12.14 -- Versi server: 10.3.25-MariaDB-0ubuntu0.20.04.1 -- Versi PHP: 7.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zon...
WITH DownVoteCount AS ( SELECT DownVoteCount = CAST(SUM(DownVotes) AS float) FROM Users), TotalVoteCount AS ( SELECT TotalVoteCount = CAST(SUM(UpVotes + DownVotes) AS float) FROM Users), DownVoteWeight AS ( SELECT DisplayName, UpVotes, -- Divides each row's down votes with the table's t...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 22, 2018 at 08:17 PM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
CREATE TABLE "public"."users"( "id" serial NOT NULL, "spotify_refresh_token" text UNIQUE, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), PRIMARY KEY ("id") ); CREATE TRIGGER "set_public_users_updated_at" BEFORE UPDATE ON "public"."users" FO...
<reponame>edersonlrf/php-011-sofn-dp-calendar SET FOREIGN_KEY_CHECKS=0; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101...
<filename>SQL/Information/sp_enable_indexes.sql IF OBJECT_ID(N'dbo.sp_ei','P') IS NOT NULL DROP PROCEDURE dbo.sp_ei GO /*------------------------------------------------------------------------------------------------- NAME: sp_ei.sql UPDATED BY: <NAME> EMAIL: <EMAIL> DESCRIPTION: Enable indexes -...
<filename>Demo/Index Demo Scripts/3a - Savings.sql USE AutoDealershipDemo; GO ----- -- Space Used SELECT OBJECT_NAME(dm_db_partition_stats.object_id) AS TableName, indexes.name AS IndexName, dm_db_partition_stats.row_count AS RowCnt, dm_db_partition_stats.used_page_count AS UsedPgs, (dm_db_partition_st...
INSERT INTO burgers (burger_name, devoured) VALUES ("Plain Burger", false) , ("Double Meat Burger", false) , ("Impossible Burger", false);
select p2.p_firstname, p2.p_lastname, c_creationdate from p1k1 JOIN (knows k2 JOIN (person p2 JOIN comment ON p2.p_personid = c_creatorid) ON k2.k_person2id = p2.p_personid) ON p1k1.k_person2id = k2.k_person1id where p1_id = 933 and c_creationdate < 1342840042;
-- file:copyselect.sql ln:6 expect:true insert into test1 (t) values ('b')
<reponame>hhudson/code_standard_tracking prompt --application/shared_components/navigation/lists/access_control begin -- Manifest -- LIST: Access Control -- Manifest End wwv_flow_api.component_begin ( p_version_yyyy_mm_dd=>'2021.10.15' ,p_release=>'21.2.2' ,p_default_workspace_id=>9690978936188613 ,p_default_a...
with campaign_report as ( select * from {{ var('campaign_report') }} ), campaign as ( select * from {{ ref('int_apple_search_ads__most_recent_campaign') }} ), organization as ( select * from {{ var('organization') }} ), joined as ( select campaign_report.date_day, ...
CREATE TABLE rules ( id SERIAL PRIMARY KEY, name VARCHAR(50) NOT NULL ); CREATE TABLE roles ( id SERIAL PRIMARY KEY, name VARCHAR(20) NOT NULL UNIQUE ); CREATE TABLE users ( id SERIAL PRIMARY KEY, name VARCHAR(30) NOT NULL, role_id INTEGER REFERENCES roles(id) ); CREATE TABLE roles_rules ( role_id INTEGER RE...
-- Torsionswaffenvarianten, Literaturkorrektur in Ausrüstung UPDATE Fernkampfwaffe SET Laden=12 WHERE FernkampfwaffeGUID='00000000-0000-0000-0002-000000000003'; UPDATE Fernkampfwaffe SET Laden=4 WHERE FernkampfwaffeGUID='00000000-0000-0000-0002-000000000004'; INSERT INTO [Ausrüstung] ([AusrüstungGUID],[Name],[Preis...
#standardSQL -- Copyright 2018 Google LLC -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- https://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or...
<reponame>sabihkhan007/SpringBoot-CRUD-Agency<gh_stars>0 /* Navicat Premium Data Transfer Source Server : [MYSQL] Local Source Server Type : MySQL Source Server Version : 80027 Source Host : localhost:3306 Source Schema : agency_database Target Server Type : MySQL Target Server...
<reponame>uzmcoco/Cotonti<filename>sql/updates/0.0.6/sql_r768.sql /* r768 Add pagination settings */ INSERT INTO `sed_config` (`config_owner`, `config_cat`, `config_order`, `config_name`, `config_type`, `config_value`, `config_default`, `config_text`) VALUES ('core', 'comments', '04', 'maxcommentsperpage', 2, '15', '',...
<filename>openGaussBase/testcase/SQL/DDL/Index/Opengauss_Function_DDL_Index_Case0092.sql -- @testpoint: with:FILLFACTOR:无效值:合理报错 DROP TABLE if EXISTS test_index_table_092 CASCADE; create table test_index_table_092( c_float1 float ) WITH (ORIENTATION = row) ; --建btree索引:fillfactor 101 drop index if exists index_092_0...
<gh_stars>0 SELECT d.Name AS DistributorName, i.Name AS IngredientName, p.Name AS ProductName,AVG(f.Rate) AS AverageRate FROM Ingredients AS i JOIN Distributors AS d ON i.DistributorId = d.Id JOIN ProductsIngredients AS pi ON i.Id = pi.IngredientId JOIN Products as p ON pi.ProductId = p.Id JOIN Feedbacks as f ON p.Id...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 20, 2020 at 03:12 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 29, 2021 at 06:36 AM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
<reponame>aazwar/cardano<filename>database/cardano_2015-10-09.sql # ************************************************************ # Sequel Pro SQL dump # Version 4499 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: localhost (MySQL 5.5.44) # Database: cardano # Generation Time: 2015-10-0...
<gh_stars>0 /* SQLyog Ultimate v12.4.3 (64 bit) MySQL - 10.1.9-MariaDB : Database - new_elearning ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOR...
<reponame>virdana/aqilapricelist -- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 18, 2017 at 11:11 AM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
<filename>a2/rides/ride_share_rides.sql -- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 03, 2020 at 06:56 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET t...
CREATE OR REPLACE FUNCTION ti.getspecimendatecalbyspecimendateid(_specimendateid integer) RETURNS TABLE(specimendatecalid integer, calage double precision, calageolder double precision, calageyounger double precision, calibrationcurveid integer, calibrationcurve character varying, calibrationprogramid integer, calibra...
<filename>oracle/sqlplus/exadata/celldisk.sql SET PAGES 999 ARRAYSIZE 50 select * from( SELECT cast(extractvalue(xmltype(a.confval),'/cli-output/context/@cell') as varchar2(20)) cell, b.* FROM v$cell_config a, XMLTABLE('//celldisk' PASSING xmltype(a.confval) COLUMNS -- "nam...
{{ transform_clusters_applications("gitlab_dotcom_clusters_applications_crossplane") }}
-- randexpr1.test -- -- db eval {SELECT (abs((select +abs(+max(b) | abs(~~count(distinct -19))) from t1))/abs(coalesce((select max(19*11*d) from t1 where (t1.e<=t1.e)),t1.f)))+case e when (t1.e) then d else c*13 | 11 end FROM t1 WHERE NOT (t1.d>=(case when (select count(*) from t1)*t1.c*t1.e+e<>t1.e*13 | f+(select (m...
<filename>src/test/resources/sql/create_table/33152fc5.sql -- file:without_oid.sql ln:71 expect:true CREATE TABLE create_table_test3 WITHOUT OIDS AS SELECT a + b AS c1, a - b AS c2 FROM create_table_test
CREATE OR REPLACE FUNCTION codes.update_code_header_description_cascade( p_old_code_header_id integer, p_code_header_description text, p_user_id integer) RETURNS integer LANGUAGE plpgsql AS $function$ declare new_code_header_id integer; begin -- -- Update a code header description select codes.update_c...
<filename>nutrition_info.sql /* Navicat MySQL Data Transfer Source Server : localhost_1 Source Server Version : 50617 Source Host : localhost:3306 Source Database : fooddb Target Server Type : MYSQL Target Server Version : 50617 File Encoding : 65001 Date: 2017-02-03 13...
<reponame>indexdata/folio-analytics<gh_stars>0 DROP TABLE IF EXISTS folio_reporting.finance_transaction_purchase_order; -- Create a derived table that joins purchase orders and po_lines fields to transactions for encumbranced cost reports in system currency -- -- Tables included: -- finance_transactions -- finan...
insert into convidados_tbl (id, nome, quantidade_acompanhantes) values (1,'Pedro',2),(2,'Maria',3),(3,'Ricardo',1);
<reponame>p1n93r/goodbyeAtJun<gh_stars>1-10 -- -------------------------------------------------------- -- 主机: 127.0.0.1 -- 服务器版本: 8.0.16 - MySQL Community Server - GPL -- 服务器OS: Win64 -- HeidiSQL 版本: 10.2.0.5599 -- ---------------...
<reponame>jtcohen6/dbt_zendesk_source {% macro get_user_columns() %} {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt_utils.type_timestamp()}, {"name": "active", "datatype": "boolean"}, {"name": "alias", "datatype": dbt_utils.type_string()}, {"name": "authenticity_token", "datatype": dbt...
-- This handles the tables and relevant information for bynar database. -- The database needs to be created prior to installing bynar on -- other systems, and the database config details should be added to bynar.json -- config file. -- A schema_mgmt table in the bynar database maintains the versioning information --...
CREATE TABLE IF NOT EXISTS IDN_AUTH_SESSION_RECORDS_STORE ( SESSION_ID VARCHAR(100) NOT NULL, SESSION_TYPE VARCHAR(100) NOT NULL, SESSION_OBJECT BLOB, TIME_CREATED BIGINT, TENANT_ID INTEGER DEFAULT -1, EXPIRY_TIME BIGINT, PRIMARY KEY (SESSION_ID, SESSION_TYPE) ) ENGINE NDB; CREATE TABLE...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 14, 2020 at 08:54 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
DELETE FROM arp_npl_oereb.transferstruktur_legendeeintrag WHERE t_datasetname = 'ch.so.arp.nutzungsplanung' ; DELETE FROM arp_npl_oereb.localiseduri WHERE t_datasetname = 'ch.so.arp.nutzungsplanung' ; DELETE FROM arp_npl_oereb.multilingualuri WHERE t_datasetname = 'ch.so.arp.nutzungsplanung...
INSERT INTO departments(name) VALUES ("Engineering"), ("Accounting"); INSERT INTO roles(title, salary, depart_id) VALUES ('Project Engineer', 110000, 1), ('Business Analyst', 86000, 2), ('Feild Engineer', 87000, 1); INSERT INTO employees(first_name, last_name, role_id) VALUES ('Renee', 'Mitchell-Ma...
## Update Commitment SPs to save logs ## USE `${DB_MAIN}`; DROP procedure IF EXISTS `Commitment_Save`; DELIMITER $$ USE `${DB_MAIN}`$$ CREATE PROCEDURE `Commitment_Save`( pUserId INT, pWIGId INT, pTitle nvarchar(500), pAssignedToArray nvarchar(256), pDependencyUser INT ) BEGIN DECLARE varUserId...
<filename>backend/prisma/migrations/20210425131126_dll/migration.sql -- CreateEnum CREATE TYPE "UserOccupation" AS ENUM ('DEVELOPER', 'STUDENT', 'ENTHUSIASTIC'); -- CreateEnum CREATE TYPE "Difficulty" AS ENUM ('EASY', 'MEDIUM', 'HARD'); -- CreateTable CREATE TABLE "users" ( "email" VARCHAR(100) NOT NULL, "nam...
USE RentACar GO --17. Find My Ride CREATE FUNCTION udf_CheckForVehicle(@townName NVARCHAR(50), @seatsNumber INT) RETURNS NVARCHAR(50) AS BEGIN RETURN ISNULL((SELECT TOP(1) CONCAT(o.Name, ' - ', m.Model) FROM Vehicles AS v JOIN Models AS m ON m.Id = v.ModelId JOIN Offices AS o ON o.Id = ...
<gh_stars>0 alter table GKLIENTS_GK_NEWS add column IS_OTHER boolean ;
ALTER TABLE interwiki ADD iw_api CLOB(64K) INLINE LENGTH 4096 NOT NULL
<filename>tables/33_asset_classification.sql CREATE TABLE asset_classification ( asset_category_id ${ASSET_CATEGORY_ID_TYPE} NOT NULL , asset_id ${ASSET_ID_TYPE} NOT NULL , CONSTRAINT fk_asset_classification_asset_category_id FOREIGN KEY (asset_category_id) REFERENCES asset_cate...
<reponame>hoanghongchuong/nuochoa<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 05, 2017 at 08:39 AM -- Server version: 10.1.26-MariaDB -- PHP Version: 7.0.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION;...
<reponame>eberkeaydin/linkedinmoodle-database CREATE TABLE IF NOT EXISTS LinkedinMoodleSchema.job_offer ( offer_post_id int, member_id int, shared_date date, end_date date, job_title varchar(150), job_sector varchar(150) ) CREATE TABLE IF NOT EXISTS LinkedinMoodleSchema.join_event ( social_event_id int, person_id int ...
<gh_stars>1-10 USE icxp3_7; CREATE TABLE IF NOT EXISTS categoria ( id INT NOT NULL AUTO_INCREMENT, nombre_cat VARCHAR(20) NOT NULL, sueldo_base FLOAT NOT NULL, hora_extra FLOAT NOT NULL, PRIMARY KEY (id) ); CREATE TABLE IF NOT EXISTS sindicato ( id INT NOT NULL AUTO_INCREMENT, nombre_sindi...
<gh_stars>1-10 ALTER TABLE `cms_category_widget_category` DROP COLUMN `recordId`; ALTER TABLE `cms_category_widget` DROP COLUMN `recordClass`;
<gh_stars>1-10 CREATE OR REPLACE PACKAGE LOG_AUDIT.PKG_LOG IS type r_logkey_recordtype is record( data_log LOG_AUDIT.t_LOG.DATA_LOG%type, seq LOG_AUDIT.t_LOG.SEQ%type, ignore_this number(1) ); type t_logkey_recordtype is table of r_logkey_recordtype; type r_CONTEXTtree_recordty...
INSERT INTO `ccnkx728pkfzzl6u`.`retail` (`product`, `description`, `optiontype`, `optiontype2`, `price`) VALUES ('cutting board', 'a lovely cutting board', '1', '0', '$23', 'https://github.com/shelkelly/ArkCustoms/blob/master/views/assets/img/store/11763.jpg?raw=true'); INSERT INTO `ccnkx728pkfzzl6u`.`retail` (`product...
<gh_stars>1-10 -- MIMIC III -- SQL Server Create Table Scripts -- -- https://mimic.physionet.org/ use MIMIC3; GO DROP TABLE IF EXISTS ADMISSIONS; CREATE TABLE ADMISSIONS ( -- rows=58976 ROW_ID INT NOT NULL, SUBJECT_ID INT NOT NULL, HADM_ID INT NOT NULL, ADMITTIME DATETIME NOT NULL, DISCHTIME DATE...
<reponame>veenapaul/SQL-Basics-to-Advanced CREATE TABLE [dbo].[copy_column ] ( [order_id] INT NULL, [customer_id] INT NULL, [order_status] TINYINT NULL, [order_date] DATE NULL, [required_date] DATE NULL, [shipped_date] DATE NULL, [store_id] ...
<filename>dataPipelines/gc_db_utils/orch/migrations/sql/UOT-86002/deploy.sql INSERT INTO crawler_status(id, crawler_name,status, datetime) VALUES (DEFAULT, 'dha_pubs', 'Ingest Complete', '2021-02-18T22:52:03'); INSERT INTO crawler_status(id, crawler_name,status, datetime) VALUES (DEFAULT, 'army_pubs', 'Crawl and Downl...
ALTER TABLE recall ADD COLUMN reasons_for_recall_other_detail TEXT
DROP DATABASE IF EXISTS `demo`; CREATE DATABASE `demo` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; USE `demo`; CREATE TABLE `user` ( `id` BIGINT PRIMARY KEY AUTO_INCREMENT, `username` VARCHAR ( 64 ) NOT NULL UNIQUE, `password` VARCHAR ( 64 ) NOT NULL, `salt` VARCHAR ( 64 ) NOT NULL, `email` VARCHAR ( 64...
<reponame>zhangdeman/base-service CREATE TABLE `zdm_admin_permission` ( `id` bigint(20) NOT NULL DEFAULT 0 COMMENT '主键id', `role_id` tinyint(4) NOT NULL DEFAULT 1 COMMENT '角色id', `permission_id` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '权限ID', `create_admin_id` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '授权管理员', `cre...
create table b3 (student_id varchar(20), time varchar(2000));
CREATE TABLE author ( authorId BINARY(16) NOT NULL, authorAvatarUrl VARCHAR(255), authorActivationToken CHAR(32), authorEmail VARCHAR(128) NOT NULL, authorHash CHAR(97) NOT NULL, authorUsername VARCHAR(32) NOT NULL, UNIQUE (authorEmail), UNIQUE (authorUsername), INDEX (authorEmail), PRIMARY KEY (authorId) ); ...
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Sep 15, 2020 at 08:01 AM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
<reponame>RNAcentral/rnacentral-import-pipeline BEGIN; INSERT INTO rfam_models ( rfam_model_id, short_name, long_name, description, seed_count, full_count, length, is_suppressed, rfam_clan_id, domain, rna_type, rfam_rna_type, so_rna_type ) ( SELECT rfam_model_id,...
<filename>yoo-master-dc2492330d5d46b48f1ceca891e0f9f7e1593fee/module/common/uxb-service/src/main/java/tpl/sql/AccountPasswordQuestion.sql<gh_stars>1-10 ## 查找一个账户的密保问题 #macro($findByAccountId(accountId)) SELECT * FROM account_password_question WHERE account_id = :accountId ORDER BY id #end ## 根据账号ID删除密保问题 #macr...
<reponame>zzachimed/ClickHouse<filename>tests/queries/0_stateless/02223_h3_test_const_columns.sql -- Tags: no-fasttest select round(geoToH3(toFloat64(0),toFloat64(1),arrayJoin([1,2])), 2); select h3ToParent(641573946153969375, arrayJoin([1,2])); SELECT round(h3HexAreaM2(arrayJoin([1,2])), 2); SELECT round(h3HexAreaKm2...
<filename>backend/burning-okr/burning-okr-app/src/main/resources/db/migration/V38__InsertFirstInitState.sql INSERT INTO public.init_state (id, init_state) VALUES (1, 1);
CREATE TABLE t_2317 (c1 int IDENTITY PRIMARY KEY, c2 int default 42); INSERT INTO t_2317 DEFAULT VALUES; INSERT t_2317 DEFAULT VALUES; INSERT INTO t_2317 with (dummy_hint) DEFAULT VALUES; GO SELECT * FROM t_2317; GO -- not yet supported since conflict at backend parser INSERT INTO t_2317 output inserted.* DEFAULT VAL...
<gh_stars>0 select what_type('{10000, 10000, 10000, 10000}' ,'int4[]') select what_type('{10000, 10000, 10000, 10000}' ,'text[]') select what_type('{10000, 10000, 10000, 10000}' ,'varchar') select what_type('{10000, 10000, 10000, 10000}' ,'date') select what_type('{10000, 10000, 10000, 10000}' ,'timestamp') drop ...
<reponame>DheoAp/App-musik -- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 30 Agu 2020 pada 04.48 -- Versi server: 8.0.11 -- Versi PHP: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40...
<reponame>slabiak/HowLongAppRestAPI CREATE DATABASE IF NOT EXISTS `howlongapi`; USE `howlongapi`; CREATE TABLE IF NOT EXISTS `restaurants` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(256), `address` VARCHAR(256), `google_id` VARCHAR(256), `photo_reference` VARCHAR(256), PRIMARY KEY (`id`) ) ...
<reponame>marcionascimentonb/public-files<gh_stars>0 /* Seed data */ USE LanguageSchool; GO SET IDENTITY_INSERT [Login] ON GO INSERT INTO Login(UserId, UserName, Password) VALUES (1,'roger', '<PASSWORD>' ); INSERT INTO Login(UserId, UserName, Password) VALUES (2,'jim', '<PASSWORD>'); INSERT INTO Login(UserId, UserNa...
-- Source: https://stackoverflow.com/questions/3123951/sqlite-how-to-calculate-age-from-birth-date SELECT user_id, (strftime('%Y', 'now') - strftime('%Y', birth_date)) - (strftime('%m-%d', 'now') < strftime('%m-%d', birth_date)) FROM User;
-- -- テーブルの構造 `categories` -- CREATE TABLE `categories` ( `category_id` bigint(20) NOT NULL COMMENT 'カテゴリID', `user_id` bigint(20) NOT NULL COMMENT 'ユーザーID', `category_name` text NOT NULL COMMENT 'カテゴリ名', `created` datetime NOT NULL COMMENT '登録日時', `modified` datetime NOT NULL COMMENT '更新日時' ) ENGINE=InnoDB...
IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_UnitTests_GetPrimaryKeys]') AND type in (N'P', N'PC')) DROP PROCEDURE [dbo].[sp_UnitTests_GetPrimaryKeys] GO CREATE Procedure [dbo].[sp_UnitTests_GetPrimaryKeys] AS SELECT TABLE_NAME as TableName, COLUMN_NAME as ColumnN...
CREATE TABLE IF NOT EXISTS LeagueAccount ( leagueID varchar(50) NOT NULL, gameLevel int, champion varchar(30), gameRole varchar(20), TFTrank varchar(10), PRIMARY KEY (leagueID)); CREATE TABLE IF NOT EXISTS LeagueAccountRank ( leagueID varchar(50) NOT NULL, accountRank varchar(...
<filename>sql/create-fake-data.sql BEGIN; INSERT INTO photos (id, owner, secret, server, farm, title, date_taken, position) VALUES ('27859607903', '142180152@N04', '01b392ba0c', '8191', '9', '20160720_NooraQvick_Rakentelu1', '2016-07-20', ST_GeographyFromText('SRID=4326;POINT(61.209260 25.116956)')); INSERT INTO ph...
<filename>tables/postType.sql CREATE TABLE IF NOT EXISTS `postType` ( `id` INT PRIMARY KEY NOT NULL AUTO_INCREMENT, `post_type` varchar(40) NOT NULL UNIQUE COMMENT '字母 数字 下划线', `icon_class` VARCHAR(100) NOT NULL DEFAULT 'fas fa-feather' COMMENT '图标 class fontawesome', `name` VARC...
CREATE TABLE IF NOT EXISTS "orders" ( id serial PRIMARY KEY, created_at timestamp with time zone default now() not null, updated_at timestamp with time zone, amount integer not null, customer_id integer not null, FOREIGN KEY (customer_id) REFERENCES "customers" (id), item_id intege...
SET DEFINE OFF; ALTER TABLE AFW_36_LIEN_OPERT_FILTR ADD ( CONSTRAINT AFW_36_LIEN_OPERT_FILTR_UKI UNIQUE (REF_TYPE_DON, REF_OPERT_FILTR) ENABLE VALIDATE) /
-- CREATE DATABASE `spider` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `job` ( `id` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, `lg_job_id`INT UNSIGNED NOT NULL COMMENT '所使用的职位id', `city_id` INT UNSIGNED NOT NULL COMMENT '城市 id', `company_id` INT UNSIGNED N...
<filename>static/sql/RESTART ROBOT ID SEQ.sql<gh_stars>1-10 ALTER SEQUENCE public."WebAXEL_robot_id_seq" RESTART
<gh_stars>1-10 insert into municipality(id, name) values(UUID_TO_BIN('a7927744-6c79-4c45-8a9a-9ab871257ef6'), 'Acatlán'); insert into municipality(id, name) values(UUID_TO_BIN('449d8048-5590-442a-a8fb-4a2380c82195'), 'Acaxochitlán'); ...
CREATE OR REPLACE FUNCTION public.kartoza_census_kemendagri_populate_census() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN insert into census (population, elderly, females, males, unemployed, village_id) (select new.jumlah_pen, -- Elderly is defined to be age over 65 ...
IF DB_ID('CheckersDB') IS NOT NULL BEGIN PRINT('Создание БД CheckersDB: БД уже существует!'); PRINT('Пересоздание...'); USE master; DROP DATABASE CheckersDB; CREATE DATABASE CheckersDB; PRINT('Создание БД CheckersDB: успешно.'); END ELSE BEGIN CREATE DATABASE CheckersDB; PRINT('Создание БД CheckersDB: успешно.'...
{% macro create_index(tbl, field) %} {{ after_commit(_create_index(tbl, field)) }} {% endmacro %} {% macro _create_index(tbl, field) %} {% if field is iterable and field is not string %} -- Multi-column indexes create index if not exists {{ tbl.name }}__index_on_{{ field|join('__') }} on {{ tbl.name }}...
<filename>Chapter09/hikingapp/postgres/initial.sql CREATE TABLE users ( user_id SERIAL PRIMARY KEY, name CHARACTER VARYING(256) NOT NULL ); CREATE TABLE trails ( trail_id SERIAL PRIMARY KEY, name CHARACTER VARYING(256) NOT NULL, distance NUMERIC(6,2) NOT NULL ); CREATE TABLE hikes ( trail_id I...
# Write your MySQL query statement below select seller_id from Sales group by seller_id having sum(price) = (select sum(price) as sm from Sales group by seller_id order by sm desc limit 1);
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; SET NOCOUNT ON; SET ANSI_NULLS ON; SET QUOTED_IDENTIFIER ON; USE Examples; SELECT VendorName, InvoiceNumber, InvoiceTotal FROM Vendors LEFT JOIN Invoices ON Vendors.VendorID = Invoices.InvoiceID ORDER BY VendorName; SELECT DeptName, Departments.DeptNo, LastNam...
ADD JAR /opt/cloudera/parcels/CDH/lib/hive/lib/hive-contrib.jar; add jar /opt/cloudera/parcels/CDH/lib/hive/lib/hive-serde.jar; SET hive.exec.dynamic.partition.mode=nonstrict; USE mcs2017013; SELECT responseCode, SUM(maleCNT), SUM(femaleCNT) FROM (SELECT responseCode, IF(gender='male', count(*), 0) as maleCnt, IF(ge...
-- Table: public.continent -- DROP TABLE public.continent; CREATE TABLE public.continent ( id bigint NOT NULL, name text COLLATE pg_catalog."default" NOT NULL, CONSTRAINT continent_pkey PRIMARY KEY (id) ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; -- Table: public.country -- DROP TABLE public.cou...
CREATE TABLE [dbo].[Post] ( [PostId] INT NOT NULL PRIMARY KEY IDENTITY(1,1), [Title] NVARCHAR(200) NOT NULL, [Content] ntext NOT NULL, [UniqueAlias] NVARCHAR(200) NOT NULL, [ReplyToPostId] INT NULL, [TopicId] INT NOT NULL, [ImageUrl] NVARCHAR(250) NULL, [CreatedDate] DATETIME NOT NULL DEFAULT GETUTCDATE(),...
CREATE TABLE IF NOT EXISTS test ( key bigint primary key, str varchar(100) );
-- book图书 insert into book (title,author,publication,price,comment) values ("边城","沈从文","机械工业出版社",36,"小城故事多"), ("骆驼祥子","老舍","机械工业出版社",43,"你是祥子么?"), ("茶馆","老舍","中国文学出版社",55,"老北京"), ("呐喊","鲁迅","人民教育出版社",71,"最后的声音"), ("朝花夕拾","鲁迅","中国文学出版社",53,"好时光"), ("围城","钱钟书","中国文学出版社",44,"你心中的围城是什么"); insert into book (title...
<reponame>CDMiXer/Woolloomooloo -- name: create-table-repos CREATE TABLE IF NOT EXISTS repos ( // Split out next_or_prev_in_order to it’s own lib repo_id INTEGER PRIMARY KEY AUTOINCREMENT ,repo_uid TEXT ,repo_user_id INTEGER ,repo_namespace TEXT //auto r...
CREATE OR REPLACE FUNCTION jobcenter.get_task(a_workername text, a_actionname text, a_job_id bigint DEFAULT NULL::bigint, OUT o_job_id bigint, OUT o_job_cookie text, OUT o_in_args jsonb, OUT o_env jsonb) RETURNS record LANGUAGE plpgsql SECURITY DEFINER SET search_path TO jobcenter, pg_catalog, pg_temp AS $function$...